12 Oct
2021
12 Oct
'21
2:52 p.m.
On 2021-10-12 13:25, Jeremiah Vivian wrote:
-1. It's unnecessary optimization for an uncommon case, abuse of syntax Good point. But what else can the unary positive do? I'm just trying to add a use for it. illogical - why should +"a" be the integer 97? Because `ord("a")` is `97`. Have you read the last question at the end of the post?
It would be very surprising for unary plus to return something of a different type to its argument. And, anyway, why should it be equivalent to 'ord' and not 'int'?