id method

1 view
Skip to first unread message

Craig Smith

unread,
May 1, 2008, 8:29:53 PM5/1/08
to learning...@googlegroups.com
Why is the id method called on an object rather than defined in a base class of the root object for all python objects? In otherwords id() is currently called:

>>> id(5)
8402264
>>>


However I'd think id would be called this way:


>>> 5.id()


Why is it the former and not the rather?


Craig



Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
Reply all
Reply to author
Forward
0 new messages