New submission from Ben Burrill :
PEP 448 defines unpacking generalizations for tuples. However, this does not
currently work for subscripted tuples that are not delimited by parentheses.
Current behavior (Tested on 3.6/3.7a4):
>>> class Subscriptable:
... def __getitem__(s
Ben Burrill added the comment:
Yeah, but in this case, you don't need parentheses unless you use unpacking.
That is unexpected behavior.
--
___
Python tracker
<https://bugs.python.org/is
New submission from Ben Burrill :
fractions.Fraction enforces its numerator and denominator to be rational. This
is a good idea for purely numeric fractions, but the abstractions that
fractions.Fraction offers would also be useful for more abstract fractions.
Some places where this might be
Change by Ben Burrill :
--
nosy: +mark.dickinson, rhettinger
___
Python tracker
<https://bugs.python.org/issue31707>
___
___
Python-bugs-list mailing list
Unsub
Ben Burrill added the comment:
The core operators, like multiplication and division, should work for any type
that defines the right operators. Hashing is tricky, and reducing the fraction
is pretty much off the table. This is why I suggested a superclass. I'll try
making a patch som