On Friday 06 August 2004 11:57 am, Guido van Rossum wrote: > > So I spent a little time futzing with python-mode and some of my > > decorator code, to try some alternative leading characters. Of the ones > > that cannot be used in valid Python code today (i.e. no backward > > compatibility issues), I tried ':', '/', '=', '*', and '|'. > > If the community can rally behind one of these, I think that would be > acceptable. They all seem arbitrary, but so is the choice of '@'. :-) Why was ';' not on Barry's list? It looks like it could be safely used as a leading character. >> def f(): ... ; bar = 3 File "<stdin>", line 2 ; bar = 3 ^ SyntaxError: invalid syntax >>> ; descriptor=42 File "<stdin>", line 1 ; descriptor=42 ^ SyntaxError: invalid syntax Using ';' instead of '@' would also make creating a list of decorators on one line consistent with other uses of ';' since ';' is already used to indicate multiple statement on one line. ;framework_stuff(lots, of, args) class Quux(object): ;check_args(int, str) ;counted ;staticmethod def frobnicate(foo, bar): pass Admittedly the ';' does suffer from not being as visible as '@', but at least the tail on the bottom dot makes it more readable than the ':' character. The other downside is the potential confusion it might cause to geriatric elisp programmers.
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