Another suggested syntax for inlining attributes, by Aaron Digulla.

This commit is contained in:
Barry Warsaw 2000-12-20 16:42:59 +00:00
parent 777bc87f27
commit 11a0deaf25
1 changed files with 7 additions and 4 deletions

View File

@ -99,8 +99,7 @@ Open Issues
2) __doc__ is the only function attribute that currently has
syntactic support for conveniently setting. It may be
worthwhile to enhance the language for supporting easy function
attribute setting. One suggestion that has been raised in
previous discussions is this syntax:
attribute setting. Here are some suggested syntaxes:
def a {
'publish' : 1,
@ -109,8 +108,12 @@ Open Issues
(args):
# ...
I.e., that a dictionary literal placed between the function
name and the argument parentheses be assigned to func_dict.
def a(args):
"""The usual docstring."""
{'publish' : 1,
'unittest': '''...''',
# etc.
}
It isn't currently clear if special syntax is necessary or
desirable.