[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, 2021 at 3:56:59 PM UTC-5 Shantanu Jain wrote:

> 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: 
>> https://github.com/python/cpython/blob/314b8787e0c50985ba708034b84ff5b37a1d47de/Lib/numbers.py#L245-L248
>>
>> Is it instead `float.__complex__` you're asking for?
>> ___
>> Python-ideas mailing list -- python...@python.org
>> To unsubscribe send an email to python-id...@python.org
>> https://mail.python.org/mailman3/lists/python-ideas.python.org/
>> Message archived at 
>> https://mail.python.org/archives/list/python...@python.org/message/L7KA5VUCJB77MUOXQPMMCSA3CDCM767O/
>>  
>> 
>> Code of Conduct: http://python.org/psf/codeofconduct/
>>
>___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/ZDFSC3V3J5KRWCJ6HCPFLA2JHJM336HP/
Code of Conduct: http://python.org/psf/codeofconduct/


[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:
> https://github.com/python/cpython/blob/314b8787e0c50985ba708034b84ff5b37a1d47de/Lib/numbers.py#L245-L248
>
> Is it instead `float.__complex__` you're asking for?
> ___
> Python-ideas mailing list -- python-ideas@python.org
> To unsubscribe send an email to python-ideas-le...@python.org
> https://mail.python.org/mailman3/lists/python-ideas.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-ideas@python.org/message/L7KA5VUCJB77MUOXQPMMCSA3CDCM767O/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/IG3UOCZFCCJTNOHWNQXRDSTWUNSVBZX2/
Code of Conduct: http://python.org/psf/codeofconduct/


[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 list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/L7KA5VUCJB77MUOXQPMMCSA3CDCM767O/
Code of Conduct: http://python.org/psf/codeofconduct/