A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-April/125092.html below:

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

[Python-Dev] Semantics of __int__(), __index__()Eric Snow ericsnowcurrently at gmail.com
Thu Apr 4 06:55:58 CEST 2013
On Wed, Apr 3, 2013 at 6:47 AM, Hrvoje Niksic <hrvoje.niksic at avl.com> wrote:
> It seems like a good feature that an __int__ implementation can choose to
> return an int subclass with additional (and optional) information. After
> all, int subclass instances should be usable everywhere where ints are,
> including in C code.

Unless you want to try to use the concrete C-API in CPython.  In my
experience the concrete API is not very subclass friendly.

-eric
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4