Return value of an assignment statement?
Bob Martin
bob.martin at excite.com
Sat Feb 23 03:32:40 EST 2008
More information about the Python-list mailing list
Sat Feb 23 03:32:40 EST 2008
- Previous message (by thread): Return value of an assignment statement?
- Next message (by thread): Return value of an assignment statement?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
in 335100 20080222 123210 Steven D'Aprano <steve at REMOVE-THIS-cybersource.com.au> wrote: >On Fri, 22 Feb 2008 08:12:56 +0000, Marc 'BlackJack' Rintsch wrote: > >> A "variable" in >> programming languages is composed of a name, a memory location, possibly >> a type and a value. In C-like languages, where you put values in named >> and typed "boxes", the memory location and type are attached to the >> name. In Python both belong to the value. > >But Python objects don't have names, so by your own definition, they >aren't variables. Names are associated with namespaces, not objects. A >name must have one and only one object bound to it at any one time; >objects on the other hand can be bound to one name, or no name, or a >thousand names. The object itself has no way of knowing what names it is >bound to, if any. > >Or, to put it another way... Python doesn't have variables. In that case neither does any other OO language.
- Previous message (by thread): Return value of an assignment statement?
- Next message (by thread): Return value of an assignment statement?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list