Nick Coghlan <ncogh...@gmail.com> added the comment:

Marking this as a documentation enhancement request for now, but I think we 
should also consider changing the type creation behaviour in 3.8 to implicitly 
add __int__ and __trunc__ definitions when __index__ is defined, but they 
aren't.

That way, no behaviour will change for classes that explicitly define __int__ 
or __trunc__, but classes that only define __index__ without defining the other 
methods will behave more intuitively.

----------
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
stage:  -> needs patch
type:  -> enhancement
versions: +Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33039>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to