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 and
Recipients and, docs@python, ezio.melotti, rhettinger, zach.ware
Date 2014-06-02.06:49:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1401691745.98.0.695213556157.issue21611@psf.upfronthosting.co.za>
In-reply-to
Content
Now I see that my message may look like a suggestion to add an encyclopedic definition of number there. Sorry.

Actually I was talking about requirements for user-defined types to make them work with int(). Something like: "If x has __int__() method return x.__int__(). Else x must be a string, bytes, or bytearray...".

After reading the docstring I was like: Should I just define __int__() for my class to work with int() or maybe int() uses isintance() and my class has also to inherit from numbers.Number?

But maybe It's just me and it's clear for everyone else.
History
Date User Action Args
2014-06-02 06:49:06andsetrecipients: + and, rhettinger, ezio.melotti, docs@python, zach.ware
2014-06-02 06:49:05andsetmessageid: <1401691745.98.0.695213556157.issue21611@psf.upfronthosting.co.za>
2014-06-02 06:49:05andlinkissue21611 messages
2014-06-02 06:49:05andcreate