On 01/21/2015 08:30 PM, Steven D'Aprano wrote: > > So what is this unspeakable, nightmarish, cryptic abomination going to look > like? Here's an example from PEP 484: > > def greeting(name: str) -> str: > return 'Hello ' + name > > > I don't know about you, but I think anyone who cannot read that and intuit > that argument `name` is a string and the return result is also a string
There is nothing inherently intuitive about that syntax. The : makes it look like a dictionary (but it isn't) and the -> looks like a pointer to something (but it isn't). > is probably going to have bigger troubles with Python than just type-hinting. Yup, true -- I do find writing meta-classes takes extra work. ;) -- ~Ethan~
signature.asc
Description: OpenPGP digital signature
-- https://mail.python.org/mailman/listinfo/python-list