Re: [Python-Dev] Python memory model (low level)

2006-06-30 Thread Martin v. Löwis
Tim Peters wrote: > Don't know what "raw data" might mean here. Any Python object can be > bound to any attribute of a class. In Python, e.g., > > class MyClass: > > mydata = ['xyz', 12] > > def method(self): > MyClass.mydata.append(-1) > # or, more inheritance-frie

Re: [Python-Dev] Python memory model (low level)

2006-06-30 Thread Josiah Carlson
Nick Maclaren <[EMAIL PROTECTED]> wrote: > "Tim Peters" <[EMAIL PROTECTED]> wrote: > > [ Many useful answers ] > > Thanks very much! That helps. Here are a few points where we are at > cross-purposes. [snip] > I believe that, using the above approach, it would be possible to > achieve good eff

Re: [Python-Dev] Python memory model (low level)

2006-06-30 Thread Nick Maclaren
"Tim Peters" <[EMAIL PROTECTED]> wrote: [ Many useful answers ] Thanks very much! That helps. Here are a few points where we are at cross-purposes. I am talking about the C level. What I am thinking of is the standard method of implementing the complicated housekeeping of a class (e.g. inheri

Re: [Python-Dev] Python memory model (low level)

2006-06-30 Thread Tim Peters
[Nick Maclaren] > I Have been thinking about software floating point, and there are > some aspects of Python and decimal that puzzle me. Basically, they > are things that are wanted for this sort of thing and seem to be > done in very contorted ways, so I may have missed something. > > Firstly, ca

Re: [Python-Dev] Python memory model (low level)

2006-06-30 Thread Nick Maclaren
Aahz <[EMAIL PROTECTED]> wrote: > > Without answering your specific questions, keep in mind that Python and > Python-C code are very different things. The current Decimal > implementation was designed to be *readable* and efficient *Python* code. > For a look at what the Python-C implementation o

Re: [Python-Dev] Python memory model (low level)

2006-06-30 Thread Aahz
On Fri, Jun 30, 2006, Nick Maclaren wrote: > > I Have been thinking about software floating point, and there are > some aspects of Python and decimal that puzzle me. Basically, they > are things that are wanted for this sort of thing and seem to be > done in very contorted ways, so I may have miss

[Python-Dev] Python memory model (low level)

2006-06-30 Thread Nick Maclaren
I Have been thinking about software floating point, and there are some aspects of Python and decimal that puzzle me. Basically, they are things that are wanted for this sort of thing and seem to be done in very contorted ways, so I may have missed something. Firstly, can Python C code assume no C