[Python-ideas] Suggestion for standardized annotations

Stephen J. Turnbull stephen at xemacs.org
Tue Mar 11 10:28:32 CET 2014


Cem Karan writes:

 > Is there any further interest in standardized annotations, or
 > should the idea be abandoned?

Obviously there's interest; standards are a good thing when you're
trying to share.  But not if they end up getting in the way of sharing
because they're too limited or you end up with a bunch of standards
such that no program can conform with all of them.

To avoid the latter, you need to provide an implementation and show
that it's useful by waiting for it to be used.  You're not going to
get a standard in to the stdlib at this point because there's not
enough usage of *any* proposed annotation standard.

If you want to make progress on this, just do it, and worry about
getting it in to the stdlib later.

To see what it takes to go directly into the stdlib, consider the PEP
461 debate.  There was no need to provide an implementation and wait
for usage to follow *because %-formatting for binary was already in
widespread practical use in Python 2*.  It was pretty clear that the
default was going to be "just like Python 2", and that's how it ended
up -- with the exception of "%r" because that would do the wrong thing
in the intended use case (and "%a" does an equivalent right thing).


More information about the Python-ideas mailing list