. I see a couple of options: 1a: Use a default type annotation, if one is not is supplied. typing.Any would presumably make the most sense. 1b: Use None if not type is supplied. 2: Rework the code to not require annotations at all.
I think I'd prefer 1a, since it's easy. 2) would be great :-) I find this bit of “typing creep” makes me nervous— Typing should Never be required! I understand that the intent here is that the user could ignore typing and have it all still work. But I’d rather is was not still there under the hood. Just because standardized way to do something is included in core Python doesn’t mean the standard library has to use it. However, typing is not currently imported by dataclasses.py. And there you have an actual reason besides my uneasiness :-) - CHB
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com