[issue10899] No function type annotations in the standard library

Guido van Rossum report at bugs.python.org
Wed Jan 12 23:43:33 CET 2011


Guido van Rossum <guido at python.org> added the comment:

On the one hand, I think that any framework that sets a convention for the meaning of annotations needs to cope with the possibility of other code using a different convention.  So in that sense this could be deemed a test case for the robustness of such a framework. :-)

On the other hand, having this precedent might give passers-by and perhaps future stdlib developers the idea that a convention has been adopted by the stdlib -- and its presence might impede the future selection of a better convention for the stdlib (or perhaps for all of Python).

So, given that they aren't used, and that they don't even seem to be set consistently, I think it's (marginally) better if they are removed and replaced by comments.

FWIW, I've long wished that the stdlib (and perhaps even PEP 8) would adopt a *comment-based* convention for indicating the types of arguments.  The Google Python style guide has a useful standard convention for this purpose:

http://google-styleguide.googlecode.com/svn/trunk/pyguide.html?showone=Comments#Comments

----------
assignee: gvanrossum -> rhettinger

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10899>
_______________________________________


More information about the Python-bugs-list mailing list