How to guard against bugs like this one?

Mark Dickinson dickinsm at gmail.com
Tue Feb 2 04:20:59 EST 2010


On Feb 2, 3:28 am, Steven D'Aprano
<ste... at REMOVE.THIS.cybersource.com.au> wrote:
>
> There is no module numbers in the standard library, at least not in 2.5.

It's new in 2.6 (and 3.0, I think;  it's there in 3.1, anyway).  It
provides abstract base classes for numeric types;  see the fractions
module source for some of the ways it can be used.  Here are the docs:

http://docs.python.org/library/numbers.html

and also PEP 3141, on which it's based:

http://www.python.org/dev/peps/pep-3141/

--
Mark



More information about the Python-list mailing list