"Fredrik Lundh" firstname.lastname@example.org 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 duplicates?
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 imported.