◐ Shell
clean mode source ↗

bpo-39981: Default values for AST nodes by isidentical · Pull Request #19031 · python/cpython

I don't fully understand the problem. What is wrong with having _field_defaults as a list of the defaults themselves? When constructing the _field_defaults tuple you can do this logic already and populate them with None or the empty list or whatever, no?

For instance, in the make_type function you could set the defaults in the tuple instead of interning the strings.