[Python-3000] PEP 31XX: A Type Hierarchy for Numbers (and other algebraic entities)

Josiah Carlson jcarlson at uci.edu
Wed Apr 25 18:03:14 CEST 2007

"Jeffrey Yasskin" <jyasskin at gmail.com> wrote:
> Here's a draft of the numbers ABCs PEP. The most up to date version
> will live in the darcs repository at
> http://jeffrey.yasskin.info/darcs/PEPs/pep-3141.txt (unless the number
> changes) for now. Naming a PEP about numbers 3.141 seems cute, but of
> course, I don't get to pick the number. :) This is my first PEP, so
> apologies for any obvious mistakes.
> I'd particularly like the numpy people's input on whether I've gotten
> floating-point support right.
> Thanks,
> Jeffrey Yasskin
> -------------------------------
> PEP: 3141
> Title: A Type Hierarchy for Numbers (and other algebraic entities)
> Version: $Revision: 54928 $
> Last-Modified: $Date: 2007-04-23 16:37:29 -0700 (Mon, 23 Apr 2007) $
> Author: Jeffrey Yasskin <jyasskin at gmail.com>
> Status: Draft
> Type: Standards Track
> Content-Type: text/x-rst
> Created: 23-Apr-2007
> Post-History: Not yet posted
> Abstract
> ========
> This proposal defines a hierarchy of Abstract Base Classes (ABCs)
> [#pep3119] to represent numbers and other algebraic entities similar
> to numbers.  It proposes:

Are the base number operations in Python all that difficult to
understand?  Do we really need to add mathematical formalism into
Python's type system before people understand the meaning of X * Y? 
Because all I really see this doing is confusing the hell out of people
who aren't mathematicians; I'm a theoretical computer scientist and I
had to try to think for a moment to verify that all of those were really
necessary to separate the cases.

I really do understand wanting to be able to ask "is operation X
supported for values Y and Z", but is this really necessary for numbers?

 - Josiah

More information about the Python-3000 mailing list