Pat Miller <patmiller@llnl.gov> wrote: > Michael wrote: > > I don't object to a syntax for function attributes [...] > I agree that > > def sqr(x): > return x*x > sqr.inline = true > > is about the same length as > > def sqr [inline=true](x): > return x*x If it's going to look like a mapping, and quack like a mapping, why not make it a mapping? def funcname(args) {attribute_mapping} : ... Docstrings then just become symantic sugar for this: def sqr(x) { '__doc__' : '''Return the square of x.''', 'inline' : True }: return x*x Charles -- ----------------------------------------------------------------------- Charles Cazabon <python@discworld.dyndns.org> GPL'ed software available at: http://www.qcc.ca/~charlesc/software/ -----------------------------------------------------------------------
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4