[Python-Dev] PEP for adding an sq_index slot so that any object, a or b, can be used in X[a:b] notation (original) (raw)
Aahz aahz at pythoncraft.com
Mon Feb 13 22:43:45 CET 2006
- Previous message: [Python-Dev] PEP for adding an sq_index slot so that any object, a or b, can be used in X[a:b] notation
- Next message: [Python-Dev] PEP for adding an sq_index slot so that any object, a or b, can be used in X[a:b] notation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Feb 13, 2006, Jim Jewett wrote:
getattr and getattribute are both things you might reasonably want to do. int is something you probably shouldn't be doing very often anymore; it is being kept for backwards compatibility.
And how do you convert a float to an int? int is NOT going away; the sole purpose of index is to enable sequence index functionality and similar use-cases for int-like objects that do not subclass from int. (For example, one might want to allow an enumeration type to index into a list.)
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"19. A language that doesn't affect the way you think about programming, is not worth knowing." --Alan Perlis
- Previous message: [Python-Dev] PEP for adding an sq_index slot so that any object, a or b, can be used in X[a:b] notation
- Next message: [Python-Dev] PEP for adding an sq_index slot so that any object, a or b, can be used in X[a:b] notation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]