18 Nov
2021
18 Nov
'21
11:05 a.m.
Neil Girdhar wrote:
The proposal to change list and str is way too ambitious.
Maybe the uppercase versions of dict, list and tuple in the typing module could be turned into direct aliases of the built-in types? With Python 3.9, there is no real distinction anyway between builtins.list and typing.List, so might as well make the latter an alias of the former. That way, people can continue to use the lowercase versions or switch to the uppercase ones. You could then even go one step further and add uppercase aliases for str, int, float, bool to the typing module. Thomas