[Python-Dev] Re: User extendable literal modifiers ?!
Martin v. Loewis
30 Sep 2002 14:59:03 +0200
"Fredrik Lundh" <email@example.com> writes:
> isn't the whole idea that with a special syntax, you can do some of the
> processing when compiling the script? it's pretty pointless to invent more
> ways to call functions with string literals as arguments...
That can't be the idea: Marshalling would store the string form, so
any compilation done until marshalling must be undone.
Perhaps the idea is that these things are interpreted once before byte
code interpretation starts (i.e. after loading a .pyc file). In that
case, a number of interesting questions arise:
- in what order, precisely, are those things evaluated? Probably in
textual order, but this is not that easy, since the marshalling
procedure might make such a requirement unimplementable.
- are duplicate occurrences eliminated? If so, how does one determine
In any case, I think users will be surprised if $h"www.google.com:80"
causes a dial-up connection to be set up as soon as a module is