On Fri, 06 Aug 2004 11:39:34 -0400, Barry Warsaw <barry at python.org> 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 '|'. > > [snipped] > > My preference then would be to use = with | and : as alternatives, in > that order. Does it really need to be only one character? Would this make the parser to complicated? If not, I would propose '::' which stands out much more than ':' What about '~'? More: '|=' '|~' ':~' ':=' - This was brought up as late binding as well: name := staticmethod(name) def name(self): ... '&' - Used for too much else IMO. Now in context: ::accepts(int,int) ::returns(float) def bar(low,high): ... |=accepts(int,int) |=returns(float) def bar(low,high): ... |~accepts(int,int) |~returns(float) def bar(low,high): ... :~accepts(int,int) :~returns(float) def bar(low,high): ... :=accepts(int,int) :=returns(float) def bar(low,high): ... ~accepts(int,int) ~returns(float) def bar(low,high): ... ~~accepts(int,int) ~~returns(float) def bar(low,high): ... If all this is not possible, then I +1 for '|'. |accepts(int,int) |returns(float) def bar(low,high): ... Regards, Florian Schulze ps: Just for reference: @accepts(int,int) @returns(float) def bar(low,high): ...
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