"{} foo".format(“bar") # or "% foo" % “bar" # isn’t % actually deprecated in Python 3+? Anyway this is formatting. is pretty much equivalent to SC: "% foo".format("bar”) So I’m not sure why you think there’s no solution in SC. Unless you want this sort of thing (which you can do in some languages): var barString = "bar"; ~interpolated = "${barString} foo"; // if shell script style worked in SC You can probably guess the problem: If that happens automatically it hoses any existing code that happens to use that character pattern. (e.g. to create a shell script). So you’d need to trigger it with a message anyway. Interpolate from the current environment would be cool and useful I think. (Maybe already exists) ~barString = “bar”; ~interpolated = “~barString foo”.interpEnvir; // working name Or have I misunderstood? S.
|