[Python-Dev] Please reject or postpone PEP 526 (original) (raw)

Koos Zevenhoven k7hoven at gmail.com
Sun Sep 4 08:08:28 EDT 2016


On Sun, Sep 4, 2016 at 1:52 PM, Mark Shannon <mark at hotpy.org> wrote: [...]

The key difference is in placement. PEP 484 style variable = value # annotation Which reads to me as if the annotation refers to the value. PEP 526 variable: annotation = value Which reads very much as if the annotation refers to the variable. That is a change in terms of semantics and a change for the worse, in terms of expressibility.

You have probably noticed this already, but in the semantics which I have now explained more precisely on python-ideas

https://mail.python.org/pipermail/python-ideas/2016-September/042076.html

an annotation like

variable: annotation = value

is a little closer to an expression annotation. I.e. it does not say that 'variable' should always have the type given by 'annotation'.

-- Koos

Cheers, Mark.


Python-Dev mailing list Python-Dev at python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/k7hoven%40gmail.com

--



More information about the Python-Dev mailing list