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/040641.html below:

[Python-Dev] Int FutureWarnings and other 2.4 TODOs

[Python-Dev] Int FutureWarnings and other 2.4 TODOs [Python-Dev] Int FutureWarnings and other 2.4 TODOsGuido van Rossum guido at python.org
Wed Dec 3 09:16:14 EST 2003
> > Andrew Koenig <ark-mlist at att.net>
> >> I think that int should be the base class, because I can imagine long
> >> supporting operations that int does not support, but not vice versa.

> Greg Ewing <greg at cosc.canterbury.ac.nz> writes:
> > Perhaps 'int' should be an abstract class, with concrete
> > subclasses 'long' and 'short'.

MWH:
> That's quite a nice idea -- a bit like an Objective C class cluster.

I've been pondering this one too.  The only downside I can think of is
that code that inherits from class int to add some method (e.g. a
class hexint whose repr() and str() call hex() instead) will no longer
inherit any implementation, and thus won't be very useful.  Inheriting
from short or long doesn't quite solve the problem either.

--Guido van Rossum (home page: http://www.python.org/~guido/)

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