New submission from Eric V. Smith <e...@trueblade.com>: With the recent (and ongoing) change to string annotations, it's no longer obvious what the type of a field is (normal, ClassVar, or InitVar).
I propose exposing the heretofore undocumented _field_type to the repr. Instead of writing it directly, I'm going to make it say one of: _field_type=_FIELD _field_type=_FIELD_CLASSVAR _field_type=_FIELD_INITVAR This is because it's an object reference, and would otherwise look like: _field_type=<object object at 0x10cc5f1f0> Which is all but useless. ---------- assignee: eric.smith components: Library (Lib) messages: 316644 nosy: eric.smith, ned.deily priority: release blocker severity: normal status: open title: dataclasses: Add the field type to Field repr type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33517> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com