[stdlib-sig] proposed removal: the types module
facundobatista at gmail.com
Thu Apr 3 19:14:54 CEST 2008
2008/4/3, Jeffrey Yasskin <jyasskin at gmail.com>:
> Just to pick one, try "type(...)". It's generally clearer to take an
> example of what you want and ask for its type, than to look in the
> types module.
For example, I have this very complex class:
>>> class C:
... def met(self):
>>> c = C()
I want, from outside to create a new method in it. So, I do the following:
>>> t = type(c.met)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: method expected 2 arguments, got 0
Ouch, it wasn't so easy. I realize myself I need to read the docs.
Where should I look for those docs and/or examples?
More information about the stdlib-sig