cpython icon indicating copy to clipboard operation
cpython copied to clipboard

gh-96151: Use a private name for passing builtins to dataclass

Open hauntsaninja opened this issue 3 years ago • 0 comments

There's no indication that BUILTINS is a special name. Other names that are special to dataclass are all prefixed by an underscore.

As mentioned in the issue, we can also avoid this locals dance altogether by using ().__class__.__base__ instead of BUILTINS.object.

  • Issue: gh-96151

hauntsaninja avatar Oct 10 '22 07:10 hauntsaninja