In most C-like languages that would be a syntax error. E.g. in C and C++ as a rule you tokenize "greedily", "1--2" would be tokenized as "1", "unary decrement operator", "2", which is illegal because you're trying to decerment an rvalue.
Python doesn't have "--", which allows the tokenizer to do something else.
+-e; // equivalent to +(-e), the unary + is a no-op if āeā is a built-in type
// because any possible promotion is performed during negation already
The same doesn't apply to, !! Which is applied as iterated binary operations (IIRC)
I am pretty sure the decriment operator came around well after that quirk was established.
qsort|10 months ago
Python doesn't have "--", which allows the tokenizer to do something else.
nyrikki|10 months ago
I am pretty sure the decriment operator came around well after that quirk was established.
j2kun|10 months ago