Re: [Python-Dev] Is static typing still optional?

2017年12月12日 01:49:38 -0800

On 12/11/2017 9:25 PM, Nick Coghlan wrote:
On 11 Dec. 2017 12:26 pm, "Eric V. Smith" <[email protected] <mailto:[email protected]>> wrote:
 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.
1c: annotate with the string "typing.Any" (this may require a tweak to the rules for evaluating lazy annotations, though)
Good idea, since it needs to be supported, anyway, especially in light of PEP 563.
Eric.
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to