This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 mark.dickinson
收信人 Arfrever, alex, barry, docs@python, eric.snow, mark.dickinson, mjacob, ncoghlan, python-dev, serhiy.storchaka, vstinner
日期 2019-06-02.10:27:17
SpamBayes Score -1.0
Marked as misclassified
Message-id <1559471237.66.0.182013088254.issue17576@roundup.psfhosted.org>
In-reply-to
内容
I'm working on a PR that finally changes the DeprecationWarnings that Serhiy introduced to TypeErrors; I think that should be acceptable, four Python versions and some years later. With that PR:

- int will always return something of exact type `int` (or raise)
- operator.index will always return something of exact type `int` (or raise)
- PyNumber_Index will always use `__index__` for int subclasses, so this should fix the issue that Barry originally reported (mismatch between `obj.__index__()` and `operator.index(obj)`).
历史
日期 用户 动作 参数
2019-06-02 10:27:17mark.dickinson修改recipients: + mark.dickinson, barry, ncoghlan, vstinner, Arfrever, alex, docs@python, python-dev, eric.snow, serhiy.storchaka, mjacob
2019-06-02 10:27:17mark.dickinson修改messageid: <1559471237.66.0.182013088254.issue17576@roundup.psfhosted.org>
2019-06-02 10:27:17mark.dickinson链接issue17576 messages
2019-06-02 10:27:17mark.dickinson创建