[Python-3000] Draft pre-PEP: function annotations
paul at prescod.net
Sat Aug 12 21:38:06 CEST 2006
Phillip. I'm having trouble following the discussion. I briefly caught up
when Talin got very concrete with syntax and I would appreciate if you could
offer some correspondingly remedial training.
Talin's example is that metadata inventor A documents that his/her users
should use this syntax for parameter docstrings:
def myfunc( x : "The x coordinate", y : "The y coordinate" )
Then metadata inventor B documents this his/her users should use this syntax
for getopt strings:
class MyHandler( CommandLineHandler ):
def list( infile:"i" = sys.stdin, outfile:"o" = sys.stdout ):
Now the user is faced with the challenge of making these two work together
in order to get the best of both worlds. What does the user type?
The mechanism of overloading, function dispatching etc. is uninteresting to
me until I understand what goes in the user's Python file. Syntax is
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-3000