Bug or feature?

Terry Reedy tjreedy at udel.edu
Thu Jan 15 18:39:40 EST 2004


"Dennis Lee Bieber" <wlfraed at ix.netcom.com> wrote in message
news:3dtid1-594.ln1 at beastie.ix.netcom.com...
> Alexey Nezhdanov fed this fish to the penguins on Wednesday 14 January
> 2004 21:40 pm:
>
> > Case 1 and case 2 prints out different calues (1 and 2 respectively).
> > Do not know - if this is a bug or feature of python.
> >
>         It's a problem with using what I would consider a side effect...
And
> not understanding that "variables" are not memory addresses.

In particular, the problem with both modifying in place (the side effect)
and returning a value.  I see a little better Guido's reason for having
list modification methods return None.  While chaining is not too
problematical, object returns would allow list expressions mixing implicit
and overt effects with possible puzzles similar to the one presented in
this thread.

Terry J. Reedy





More information about the Python-list mailing list