New submission from James Lu:

if you assign a lambda to a object and call it,you get this:
Traceback (most recent call last):
  File "<pyshell#21>", line 1, in <module>
    n.__div__(3)
TypeError: <lambda>() takes exactly 2 arguments (1 given)
The full test is here:
>>> n = num()
>>> n.__div__
<function <lambda> at 0x040B2DF0>
>>> n/3
Traceback (most recent call last):
  File "<pyshell#20>", line 1, in <module>
    n/3
TypeError: unsupported operand type(s) for /: 'num' and 'int'
>>> n.__div__(3)
Traceback (most recent call last):
  File "<pyshell#21>", line 1, in <module>
    n.__div__(3)
TypeError: <lambda>() takes exactly 2 arguments (1 given)

----------
messages: 193166
nosy: James.Lu
priority: normal
severity: normal
status: open
title: Lambda assigned to object does not automatically get self

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18474>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to