[issue47083] The __complex__ method is missing from the complex, float, and int built-in types

2022-03-31 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue47083] The __complex__ method is missing from the complex, float, and int built-in types

2022-03-29 Thread Géry
Géry added the comment: > I think this may fine as-is. In general, virtiual classes only promise that > an operation will work rather than promsing the presence of a particular > method. Okay, I just wanted to make sure that the absence of the `__complex__` method was intended and not an

[issue47083] The __complex__ method is missing from the complex, float, and int built-in types

2022-03-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think this may fine as-is. In general, virtiual classes only promise that an operation will work rather than promsing the presence of a particular method. An object can be Iterable without defining __iter__ because iter() can use __getitem__ and

[issue47083] The __complex__ method is missing from the complex, float, and int built-in types

2022-03-24 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10, mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47083] The __complex__ method is missing from the complex, float, and int built-in types

2022-03-21 Thread Géry
New submission from Géry : ## Expected outcome ``` >>> hasattr(complex(), '__complex__') True >>> hasattr(float(), '__complex__') True >>> hasattr(int(), '__complex__') True ``` ## Actual outcome ``` >>> hasattr(complex(), '__complex__') False >>> hasattr(float(), '__complex__') False >>>