Addressing the last element of a list

Peter Otten __peter__ at web.de
Tue Nov 8 05:26:09 EST 2005


pinkfloydhomer at gmail.com wrote:

> Just to satisfy my curiousity: Is there a way to do something like the
> reference solution I suggest above?

No. You cannot overload assignment. 
Of course, for mutable objects you can use the object as the "reference" to
itself.

Peter




More information about the Python-list mailing list