Alexander Belopolsky wrote: > Speaking of YAGNI, does anyone want to defend > >>>> complex('١٢٣٤.٥٦j') > 1234.56j *If* we allow float('١٢٣٤.٥٦') (as we currently do, but is being disputed by some), then we should allow complex('١٢٣٤.٥٦j'). It would be silly for complex to be more restrictive than float. > Especially given that we reject complex('1234.56i'): I don't understand why you use 'i' when Python uses 'j' as the symbol for imaginary numbers. >>> complex('1234.56j') 1234.56j works fine. I have no problem with Python choosing one of i/j as the symbol for imaginary-1 and rejecting the other. I prefer i rather than j, but that's because my background is in maths rather than electrical engineering, but I can live with either. But in any case, please don't conflate the question of whether Python should accept j and/or i for complex numbers with the question of supporting non-arabic numerals. The two issues are unrelated. -- Steven
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4