2009/3/13 Lennart Regebro <rege...@gmail.com>:
> On Mon, Mar 9, 2009 at 23:35, Dan Korostelev <nad...@gmail.com> wrote:
>>>>> def hello(who:'name') -> None:
>> ...     print('Hello, {0}!'.format(who))
>> ...
>>>>> hello.__annotations__
>> {'who': 'name', 'return': None}
> Yup. So, it's stored on the function, not the class. Hence, it will not 
> collide.
> Might be confusing though.

As I said before, even if python itself won't add __annotations__ to
some callable objects, this thing may be done by third-party tools.
The PEP doesn't restrict annotations to functions only, instead
there's a note that any callable thing can be annotated like that.

WBR, Dan Korostelev
Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to