Note : This is an experimental page, Python can be learned interactively from a prompt, and learning by
observations is a good habit, so this page. -- BaijuMuthukadan

(This page is not linked from main pages yet.)

=== Creating Integer Objects ===
{{{
#!python
>>> a = 1
>>> a
1
>>> type(a)
<type 'int'>
>>> b = int(1)
>>> b
1
>>> type(b)
<type 'int'>
}}}

=== __del__ workings ===

{{{
#!python
>>> class C:
...     def __del__(self):
...         print "HI"
... 
>>> c=C()
>>> del(c)
HI
>>> c=C()
>>> c=1
HI
>>> c
1
>>> c=C()
>>> d=c
>>> c=4
>>> d=7
>>> d
HI
7
>>> c=C()
>>> d=c
>>> c=4
>>> d=7
HI
}}}

=== list append and assignment ===

{{{
#!python
>>> a=[1,2,3]
>>> print a
[1, 2, 3]
>>> a=a.append(4)
>>> print a
None
}}}

=== staticmethod vs. classmethod ===

{{{
#!python
>>> class C:
...     a=1
...     @staticmethod
...     def temp():
...             print C.a
... 
>>> C.temp()
1
>>> class C:
...     a=1
...     @classmethod
...     def temp(cls):
...             print cls.a
... 
>>> C.temp()
1
}}}