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/2003-December/040723.html below:

[Python-Dev] Re: Int FutureWarnings and other 2.4 TODOs

[Python-Dev] Re: Int FutureWarnings and other 2.4 TODOs [Python-Dev] Re: Int FutureWarnings and other 2.4 TODOsNeil Schemenauer nas-python at python.ca
Thu Dec 4 19:02:17 EST 2003
On Thu, Dec 04, 2003 at 03:54:21PM +1300, Greg Ewing wrote:
> Does anyone have a real-life use case for subclassing int?

Not me. Dylan does not allow it's concrete numeric classes to be
subclassed.  That allows efficient method dispatch given restrictive
enough declarations.  Here is the standard numberic classes:

    class number(object):
        # Open Abstract Class

    class complex(number):
        # Sealed Abstract Class

    class real(complex):
        # Sealed Abstract Class

    class float(real):
        # Sealed Abstract Class

    class single_float(float)
        # Sealed Class

    class double_float(float)
        # Sealed Class

    class rational(real):
        # Sealed Abstract Class

    class integer(rational):
        # Sealed Class

complex is sealed which basically means that it cannot be subclassed
by users.  That allows Sealing is described here:
http://www.gwydiondylan.org/drm/drm_70.htm.

The language reference does not describe a "long" integer type but
the implementation is free to provide one.

  Neil

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