unexpected behavior: did i create a pointer?

Wildemar Wildenburger lasses_weil at klapptsowieso.net
Fri Sep 7 09:59:53 EDT 2007


Steven D'Aprano wrote:
> On Fri, 07 Sep 2007 11:46:38 +0200, Wildemar Wildenburger wrote:
> 
>> gu wrote:
>>> hi to all!
>>> after two days debugging my code, i've come to the point that the
>>> problem was caused by an unexpected behaviour of python. or by lack of
>>> some information about the program, of course! i've stripped down the
>>> code to reproduce the problem:
>>>
>>> [snip FAQ]
>> Yes, basically you *created* a pointer. That's all that python has:
>> pointers.
> 
> No, you are confusing the underlying C implementation with Python.
I do not, as I have no clue of the C implementation :).
I just thought I'd go along with the analogy the OP created as that was 
his mindset and it would make things easier to follow if I didn't try to 
forcibly change that.
Please note that I had intended for the word 'created' to be in quotes 
rather than asterisks. I bit myself after I read my mistake online but 
then thought "Who cares?". I should have, maybe :).
And yes, I will admit that going along with that analogy isn't the best 
way to explain it. Grant Edwards in reply to Peter Otten makes it much 
clearer, I guess.

/W



More information about the Python-list mailing list