[Zope-dev] Python3 and attribute annotations.
Lennart Regebro
regebro at gmail.com
Fri Mar 13 03:02:29 EDT 2009
On Mon, Mar 9, 2009 at 23:35, Dan Korostelev <nadako at 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.
--
Lennart Regebro: Pythonista, Barista, Notsotrista.
http://regebro.wordpress.com/
+33 661 58 14 64
More information about the Zope-Dev
mailing list