In CPython, there is an assumption that builtin functions are never
bound. What an obscure stuff. Hopefully an example would clarify this.
# ex.py
class C:
method = cmp
c = C()
print c.method(1, 1)
$ python ex.py
0
$ ip ex.py
Traceback (most recent call last):
File __main__, line unknown, in Initialize
TypeError: cmp() takes exactly 2 arguments (3 given)
PyPy has suffered this too:
http://codespeak.net/pipermail/pypy-svn/2005-May/004905.html
Standard library modules like optparse and unittest are known to rely
on this. I don't like this quirk at all, but perhaps you want to know
these stuffs...
Seo Sanghyeon
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com