Identifier normalization: Why is the micro sign converted into the Greek letter mu?

There are two different characters involved here. One is the MICRO SIGN, which is the one on the keyboard, and the other is GREEK SMALL LETTER MU. To understand what’s going on, we should take a look at how Python defines identifiers in the language reference: identifier ::= xid_start xid_continue* id_start ::= <all characters in … Read more

Why is negative id or zero considered a bad practice?

To be clear, this question and answer are about using negative numbers for surrogate keys, not for natural keys. As far as I know, there are three reasons for considering it to be a bad practice. It violates the principle of least surprise. Some people assume all ID numbers are non-negative. Some people use negative … Read more

Dollar sign in variable name

The only legal characters according to the standard are alphanumerics and the underscore. The standard does require that just about anything Unicode considers alphabetic is acceptable (but only as single code-point characters). In practice, implementations offer extensions (i.e. some do accept a $) and restrictions (most don’t accept all of the required Unicode characters). If … Read more

tech