[Python-Dev] Similar syntax (original) (raw)
Gustavo Niemeyer niemeyer at conectiva.com
Fri Aug 6 00:07:43 CEST 2004
- Previous message: [Python-Dev] use of #pragma GCC system_header to suppress _XOPEN_SOURCE warnings
- Next message: [Python-Dev] Similar syntax
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] use of #pragma GCC system_header to suppress _XOPEN_SOURCE warnings
- Next message: [Python-Dev] Similar syntax
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]