On 5/13/21 10:46 AM, Eric V. Smith wrote:
I literally just went down this road--for a while there was a special sentinel value for the eval_str parameter to inspect.get_annotations(). The repr I went with was "<id>", e.g "<MISSING>". It depends on how seriously you take the idea that eval(repr(x)) == x. Certainly most objects don't actually support that, e.g., uh, object(), a type which I understand is available in most Python implementations.>>> MISSING <class '__main__.MISSING'>I think a repr of just "MISSING", or maybe "dataclasses.MISSING" would be better.
Cheers, //arry/
_______________________________________________ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/FJW37TM7JKZOSZEIYYADJLULT7EH6AJN/ Code of Conduct: http://python.org/psf/codeofconduct/