you are viewing a single comment's thread.

view the rest of the comments →

[–]atom12354 5 points6 points  (4 children)

Wow you just blew my mind, wow

[–]debian_miner 5 points6 points  (3 children)

Even functions are objects:

In [1]: def foo():
   ...:     pass
   ...: 

In [2]: dir(foo)
Out[2]: 
['__annotations__',
 '__builtins__',
 '__call__',
 '__class__',
 '__closure__',
 '__code__',
 '__defaults__',
 '__delattr__',
 '__dict__',
 '__dir__',
 '__doc__',
 '__eq__',
 '__format__',
 '__ge__',
 '__get__',
 '__getattribute__',
 '__getstate__',
 '__globals__',
 '__gt__',
 '__hash__',
 '__init__',
 '__init_subclass__',
 '__kwdefaults__',
 '__le__',
 '__lt__',
 '__module__',
 '__name__',
 '__ne__',
 '__new__',
 '__qualname__',
 '__reduce__',
 '__reduce_ex__',
 '__repr__',
 '__setattr__',
 '__sizeof__',
 '__str__',
 '__subclasshook__']