Skip to content

Instantly share code, notes, and snippets.

Created August 12, 2011 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/d2ded62e5f885d61ff75 to your computer and use it in GitHub Desktop.
Save anonymous/d2ded62e5f885d61ff75 to your computer and use it in GitHub Desktop.
[utdemir@utdemir_asus ~]$ python3
Python 3.2.1 (default, Jul 11 2011, 12:37:47)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> class A():
... pass
...
>>> class B(object):
... pass
...
>>> A
<class '__main__.A'>
>>> B
<class '__main__.B'>
>>> A()
<__main__.A object at 0x7f47156d7350>
>>> B()
<__main__.B object at 0x7f47156d7390>
>>>
[utdemir@utdemir_asus ~]$ python2
Python 2.7.2 (default, Jun 29 2011, 11:10:00)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> class A():
... pass
...
>>> class B(object):
... pass
...
>>> A
<class __main__.A at 0x7f4a581db120>
>>> B
<class '__main__.B'>
>>> A()
<__main__.A instance at 0x7f4a581eefc8>
>>> B()
<__main__.B object at 0x7f4a581f0c90>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment