[Python-Dev] User extendable literal modifiers ?!

Guido van Rossum guido@python.org
Fri, 27 Sep 2002 11:04:36 -0400

> What's more important is whether this ideas raises interest or
> not. I'm not sure myself whether it's a good idea and that's why I
> posted the idea here.

There are lots of possibilities for overgeneralization here.
E.g. most of the examples of the $x"..." syntax are just as easily
done using a function call, either passing a string or a few numbers.

One danger of new notations is that it could be much harder to find
out what it means if you're not familiar with a program.  If you see a
call to Frobozz(1, 2), it usually isn't hard to find the definition of
Frobozz -- at the worst, it's hidden in an "import *", and that's one
reason to avoid those.  But if you see $f"1 2" in a file, you may have
to grep all code that is imported by the program containing that file
for calls to sys.register.

--Guido van Rossum (home page: http://www.python.org/~guido/)