[Python-Dev] Similar syntax
Gustavo Niemeyer
niemeyer at conectiva.com
Fri Aug 6 00:07:43 CEST 2004
> Ok, I'll try to summarize the current status of the feature
> so that I (and others) can understand if there's something to
> be done:
>
> - Decorators are going in on 2.4.
[...]
> - The @ character is used in at least two tools (Leo, IPython),
> and this is being considered as something bad, but not a
> show stopper;
>
> - The perlish argument is non-sense;
>
> I belive that either some different syntax which most
> people agree upon is raised, or we're done.
After writing this list, I thought about something which is
close to the current implementation, but avoids @. If it was
already suggested, please forgive me. At least I wasn't able
to find it in the PEP/Wiki:
<static>
def method(foo):
pass
and also
<accepts(int,int), returns(float)>
def bar(low, high):
...
Advantages over current syntax:
- Avoids introducing a new meaningful character in the syntax;
- Leaves Leo and IPython people happy;
- ">" is already being used on "print >>", so special casing
it wouldn't be something new;
- Not acceptable in the current syntax;
- Looks like a tag;
--
Gustavo Niemeyer
http://niemeyer.net
More information about the Python-Dev
mailing list