[Python-3000] Draft pre-PEP: function annotations (original) (raw)
Paul Prescod paul at prescod.net
Tue Aug 15 20:54:48 CEST 2006
- Previous message: [Python-3000] Draft pre-PEP: function annotations
- Next message: [Python-3000] [Python-Dev] Type of range object members
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-3000] Draft pre-PEP: function annotations
- Next message: [Python-3000] [Python-Dev] Type of range object members
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]