Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
Closed
Description
Bug report
Bug description:
>>>"%.f"%(1+1j)Traceback (mostrecentcalllast):File"<python-input-27>",line1,in<module>"%.f"%(1+1j)~~~~~^^~~~~~TypeError:mustberealnumber,notcomplex>>>"%.d"%(1+1j)Traceback (mostrecentcalllast):File"<python-input-28>",line1,in<module>"%.d"%(1+1j)~~~~~^^~~~~~TypeError:%dformat:arealnumberisrequired,notcomplex
As you can see, trying to format acomplex with.d and.f produces two outputs with the same meaning but different expressions.
Expected: same expressions for same meaning.
CPython versions tested on:
3.14
Operating systems tested on:
Windows