(original) (raw)
On Sun, Jun 1, 2008 at 2:15 AM, Raymond Hettinger <python@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