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

Paul Prescod paul at prescod.net
Tue Aug 15 20:54:48 CEST 2006

On 8/15/06, Phillip J. Eby <pje at telecommunity.com> wrote:
> I don't see a reason to require an explicit wrapper except as a
> disambiguator.  That is, until you *actually* need them,
> discriminator-wrappers are a YAGNI.

How will you know you "actually" need them until you run a tool on your code
and it crashes or give the wrong result? And what will you do then, go and
clean up your code? And what if the libraries have defined no disambiguation
syntax? Then what?

Function attributes are at least disambiguated by name. You can't put a
function attribute on a function without giving it a name. We need at least
this level of disambiguation for metadata.

Docstrings have become somewhat of a mess of various meanings. Back in the
late 90s I attached XPaths to them and the Spark guy attached parser grammar
instructions. Pydoc pointed at one of my xpath-embedding classes would
produce useless gibberish. So in that sense there was a clash. Given that
pydoc is seldom a mission critical part of any system, this is a minor
issue. Confused type declarations could cause bigger problems, from crashed
compilers to segmentation faults in intepreters.

 Paul Prescod
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-3000/attachments/20060815/92902a10/attachment.htm 

More information about the Python-3000 mailing list