[Python-3000] Draft pre-PEP: function annotations

Paul Prescod paul at prescod.net
Sun Aug 13 10:17:26 CEST 2006


On 8/11/06, Collin Winter <collinw at gmail.com> wrote:
...

What Josiah is hinting at -- and what Talin describes more explicitly
> -- is the problem of how exactly "chaining" annotation interpreters
> will work.


I don't think the question is really how to chain them. The question is how
to avoid them stepping on top of each other accidentally.

The case I've thought out the most completely is that of using
> decorators to analyse/utilise the annotations:


This is not as interesting a case as the following:

annotation scheme 1 is invented by person 1
annotation scheme 2 is invented by person 2
person 3 must use them together on a single function
persons 4 through 1000 write programs that hunt for annotation scheme 1
objects on functions in modules.
persons 2000 through 4000 write programs that hunt for annotation scheme 2
objects.

How can persons 4 through 4000 be confident when they see an annotation on
an object that they are interpreting it as person 3 intended? How can they
be confident that they are not accidentally processing an object (a list, a
string, a file, a customer object, whatever) that was intended to be an
assertion in annotation scheme 1 according to the rules of annotation scheme
2?

 Paul Prescod
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-3000/attachments/20060813/7929f61c/attachment.html 


More information about the Python-3000 mailing list