[Python-Dev] Re: Call for defense of @decorators (original) (raw)
Fernando Perez fperez528 at yahoo.com
Fri Aug 6 02:39:41 CEST 2004
- Previous message: [Python-Dev] Call for defense of @decorators
- Next message: [Python-Dev] Re: Call for defense of @decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Gustavo Niemeyer wrote:
- The @ character is used in at least two tools (Leo, IPython), and this is being considered as something bad, but not a show stopper;
Just to record my comments here as the ipython author.
I've held off on calling on the ipython lists for suggestions on what to replace @ with, waiting for the dust to settle on this matter.
If @ ends up being accepted, ipython can obviously adapt. I'll replace it with alternative syntax, be it @@, %, or some other kind of special-casing trick.
It would not make me happy, and it worries me that ipython explicitly uses (for good reasons, I like to think), the three characters explicitly avoided by python:
@ -> ipython's 'magic' control system, which is fully user-extensible.
? -> ipython's object introspection system, with ?? showing additional info.
$ -> in ipython's shell extensions, a syntax for quick shell output capture, either into strings ($astr=ls *.py) or lists ($$alist=ls *.py).
I worry that soon I'll end up rewriting other parts of ipython as soon as ? and $ also become python characters.
But I accept that fact, since nowhere did the docs ever promise that these characters would remain off-limits forever. I knew there was a risk involved, and if that happens, I'll figure out a way to solve it. But I'd much rather not.
Best,
Fernando.
- Previous message: [Python-Dev] Call for defense of @decorators
- Next message: [Python-Dev] Re: Call for defense of @decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]