[issue34676] Guarantie that divmod() and PyNumber_Divmod() return a 2-tuple
Paul Ganssle
report at bugs.python.org
Fri Sep 14 12:43:35 EDT 2018
Paul Ganssle <p.ganssle at gmail.com> added the comment:
I would be somewhat worried that this might break something like numpy (though not numpy specifically) which might be counting on the ability to write a wrapper that overloads this behavior.
Another concern is that people could be playing it fast-and-loose with actual types, and are returning something that fits the bill for a collections.abc.Sequence with length 2 (e.g. return [a, b]) but isn't an actual Tuple.
I would at least think that this should go through a deprecation cycle.
----------
nosy: +p-ganssle
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34676>
_______________________________________
More information about the Python-bugs-list
mailing list