[Python-Dev] Mini-Pep: Simplifying the Integral ABC (original) (raw)
Mark Dickinson dickinsm at gmail.com
Thu Jun 5 05:44:09 CEST 2008
- Previous message: [Python-Dev] Mini-Pep: Simplifying the Integral ABC
- Next message: [Python-Dev] Mini-Pep: Simplifying the Integral ABC
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Jun 1, 2008 at 2:15 AM, Raymond Hettinger <python at rcn.com> wrote:
Proposal -------- Remove non-essential abstract methods like index, three argument pow, lshift, rlshift, rshift, rrshift, and, rand, xor, rxor, or, ror, and invert, numerator, and denominator.
+1 from me.
I'd support removing all these, minus the exceptions already pointed out (index, numerator, denominator). As a (so far incomplete) effort to speed up the Decimal type I recently implemented a decimal-based integer type; this type would seem a natural candidate to inherit from Integral, but the logical and shift operators above make less sense for this type.
The other odd man out here is three-argument pow; this is a method that makes sense for integers without reference to the way they're stored. So maybe this should stay. (Though I've occasionally wondered why three-argument pow is part of the core language, rather than being in the standard library.)
Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20080604/10d51011/attachment.htm>
- Previous message: [Python-Dev] Mini-Pep: Simplifying the Integral ABC
- Next message: [Python-Dev] Mini-Pep: Simplifying the Integral ABC
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]