This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author James.Lu
Recipients James.Lu
Date 2013-07-16.14:20:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1373984454.04.0.881865417632.issue18474@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2013-07-16 14:20:54James.Lusetrecipients: + James.Lu
2013-07-16 14:20:54James.Lusetmessageid: <1373984454.04.0.881865417632.issue18474@psf.upfronthosting.co.za>
2013-07-16 14:20:54James.Lulinkissue18474 messages
2013-07-16 14:20:53James.Lucreate