Python is DOOMED! Again!
ethan at stoneleaf.us
Thu Jan 22 07:02:11 CET 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. ;)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: OpenPGP digital signature
More information about the Python-list