[Python-ideas] Re: Consider having numbers.Real provide __complex__?

2021-01-18 Thread Neil Girdhar
Thanks for the correction Mark, I didn't realize that! Shantanu is right about what my ask was meant to be. I guess I'm nowhere near the first to propose things like this and there's a lot of discussion in various threads about it that I wasn't aware of. Best, Neil On Monday, January 18,

[Python-ideas] Re: Consider having numbers.Real provide __complex__?

2021-01-18 Thread Shantanu Jain
Yes, I believe the ask is for `int.__complex__`, `float.__complex__` and `complex.__complex__` ( https://github.com/python/mypy/issues/3186#issuecomment-762121456) On Mon, 18 Jan 2021 at 09:47, Mark Dickinson wrote: > Inheriting from `numbers.Real` _does_ give you `__complex__`, though: >

[Python-ideas] Re: Consider having numbers.Real provide __complex__?

2021-01-18 Thread Mark Dickinson
Inheriting from `numbers.Real` _does_ give you `__complex__`, though: https://github.com/python/cpython/blob/314b8787e0c50985ba708034b84ff5b37a1d47de/Lib/numbers.py#L245-L248 Is it instead `float.__complex__` you're asking for? ___ Python-ideas mailing