Python is DOOMED! Again!

Ethan Furman ethan at stoneleaf.us
Thu Jan 22 01:02:11 EST 2015


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~


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20150121/db705a49/attachment.sig>


More information about the Python-list mailing list