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