reference or pointer to some object?

JCM joshway_without_spam at myway.com
Wed Jan 12 17:23:30 EST 2005


Torsten Mohr <tmohr at s.netic.de> wrote:
...
> I still wonder why a concept like "references" was not
> implemented in Python.  I think it is (even if small)
> an overhead to wrap an object in a list or a dictionary.

> Isn't it possible to extend Python in a way to use
> real references?  Or isn't that regarded as necessary?

Some think it's unwise.  The ability to modify local variables in your
caller's scope can lead to messiness, especially if the modifiability
isn't evident to the caller (eg. via C's "&").



More information about the Python-list mailing list