[Python-Dev] Semantics of __int__(), __index__()

Barry Warsaw barry at python.org
Wed Apr 3 19:56:04 CEST 2013


On Apr 03, 2013, at 01:46 PM, Barry Warsaw wrote:

>It's a consistency-of-implementation issue.  Where built-in types are
>callable, they return concrete instances of themselves.  This is true for
>e.g. list, tuple, dict, bytes, str, and should also be true of int.

Well, I guess it's consistent for some of those built-in types <wink>.

-Barry


More information about the Python-Dev mailing list