pointer
Joshua Marshall
jmarshal at mathworks.com
Wed Apr 10 14:48:02 EDT 2002
Jeff Shannon <jeff at ccvcorp.com> wrote:
> In article <a8vk7h$apk$1 at news.mathworks.com>,
> jmarshal at mathworks.com says...
>>
>> To emulate the semantics of pointers, I like using single-element
>> lists, as some others have suggested.
>>
> I prefer to *not* emulate the semantics of pointers. If I have
> data that needs to be changed in such a way, I'll put it in a
> class and change it through a method. If I wanted to fiddle with
> pointers, I'd program in C.
But then you weren't the one asking about pointers in Python :)
I do agree though. Other non-pointery approaches are cleaner.
More information about the Python-list
mailing list