spir ☣ wrote: > What useful distinctions are or may be done, for instance in documentation?
Python mainly considers: object identity (x is y, determined by id()) object value (x == y, determined by the implementations of relevant __eq__ methods) For many objects, their value degenerates to being the same as their identity (i.e. they compare equal only with themselves), but others have for more useful comparisons defined (e.g. containers, numbers). In addition to objects with their identities and values, there are references to objects. These 'references' are the only things in Python which aren't first class objects, since they reflect lookup entries in some namespace or container, such as the mapping from names to pointers in a class or module __dict__ or a function's locals, or the items stored in a list or set. Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia --------------------------------------------------------------- _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor