I just got bit by a bug that would have been prevented if list were a reserved word in Python. (Dumbery on my part, to be sure.)
So why isn\'t list (or
Only keywords are reserved.
list is not a keyword but a built-in type, as are str, set, dict, unicode, int, float, etc.
There is no point in reserving each and every possible built-in type; python is a dynamic language and if you want to replace the built-in types with a local name that shadows it, you should be able to.
Think of list and the other types as a pre-imported library of object types; you wouldn't expect defaultdict from collections to be reserved either?
Use a static code analyzer to catch errors like these; most IDEs let you integrate one with ease.