New submission from Serhiy Storchaka <storchaka+cpyt...@gmail.com>:
The complex class has special methods which always raise a TypeError: __int__ __float__ __floordiv__ __mod__ __divmod__ After removing them the corresponding operations (converting to int and float, operators // and %, function divmod()) will still a TypeError. Advantages of removing: * Less code to maintain. * More uniform error messages. * Clearer output of help(). * Possibility to implement a type with __rfloordiv__, __rmod__ and __rdivmod__ which support complex numbers. ---------- components: Interpreter Core messages: 378218 nosy: gvanrossum, serhiy.storchaka priority: normal severity: normal status: open title: Remove complex.__float__, complex.__floordiv__, etc type: enhancement versions: Python 3.10 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41974> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com