On Aug 10, 6:42 pm, Christoph Zwerschke <[EMAIL PROTECTED]> wrote: > Duncan Booth schrieb: > > > There is no currently recommended way to make such annotations, so how > > could the PEP mention it? > > Then it could mention the fact that there is currently no recommended > way (and maybe make some suggestions, like those given by you).
I think you're missing the point here. PEP 3017 is policy-neutral: it describes a mechanism to annotate functions and arguments, and that's it. IOW, there is currently no recommended way to do *anything* with annotations(**). That is entirely left up to users and third-party packages, and the PEP goes out of its way to disclaim all authority on policy. The following quote from the PEP sums it up well: "Following from point 2, this PEP makes no attempt to introduce any kind of standard semantics, even for the built-in types. This work will be left to third-party libraries." Your concern is misplaced; it just doesn't belong in the PEP. "So", you might ask, "where does it belong then?" The answer is probably "nowhere". Since annotations are intended to be used by third party packages, those packages will define the semantics of the annotations, and the recommendations would only be applicable to users of that package, and not to Python users in general. It might come to pass that someday a different PEP will be written to standarize stuff like this, but that usually only happens after the community has had time to explore the problem domain for awhile (cf. WSGI). Carl Banks (**) - Actually there is a minor policy recommendation: that the pydoc and inspect module learn to understand and display the annotations. -- http://mail.python.org/mailman/listinfo/python-list