spacepaste

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
>>> class test:
...     def __new__():
...         print 'in new function'
...         
...     def __init__():
...         print 'in init function'
... 
>>> print test()
Traceback (most recent call last):
  File "<input>", line 1, in <module>
TypeError: __init__() takes no arguments (1 given)
>>> del test
>>> class test:
...     def __new__(self):
...         print 'in new function'
...     def __init(self):
... 
... 
...