On 27 September 2016 at 22:46, Neil Girdhar <mistersh...@gmail.com> wrote:
> Yes, I understand that, but I don't see how that would help at all with
> annotations.  Aren't annotations also evaluated at "compile time"?

This thread isn't about circular references in general, just circular
references in the context of type hinting.

For type hinting purposes, it already doesn't matter whether you use a
variable name to refer to a type or a quoted string literal, as the
typechecker ignores the quotation marks (and this is mandated by PEP
484).

For runtime annotation use, the difference is visible, but the only
required runtime behaviours for the typechecking use case are "doesn't
throw an exception" and "doesn't take a prohibitive amount of time to
evaluate when the function is defined".

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to