<div dir="ltr"><div><div><div><div><div>On 1 September 2016 at 22:37, Guido van Rossum <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:<br>> On Thu, Sep 1, 2016 at 9:30 AM, Ivan Levkivskyi <<a href="mailto:levkivskyi@gmail.com">levkivskyi@gmail.com</a>> wrote:<br>> > There is a convention for function annotations in PEP 484 that a missing<br>> > annotation is equivalent to Any, so that I like your first option more.<br>><br>> But Steven wasn't proposing it to mean Any, he was proposing it to<br>> mean "type checker should infer". Where I presume the inference should<br>> be done based on the assignment in __init__ only.<br><br></div>Sorry for misunderstanding.<br><br>On 2 September 2016 at 04:38, Nick Coghlan <<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>> wrote:<br>> However, a standalone Ellipsis doesn't currently have a meaning as a<br>> type annotation (it's only meaningful when subscripting Tuple and<br>> Callable), so a spelling like this might work:<br>><br>>     NAME: ...<br>><br>> That spelling could then also be used in function definitions to say<br>> "infer the return type from the return statements rather than assuming<br>> Any"<br><br></div><div>Interesting idea.<br></div>This is somehow similar to one of the existing use of Ellipsis: in numpy it<br></div>infers how many dimensions needs to have the full slice, it is like saying<br></div>"You know what I mean". So I am +1 on this solution.<br><br>--<br></div>Ivan<br><div><div><div><div><div><br></div></div></div></div></div></div>