In general: I like it!
> >>>>> On Tue, 19 Apr 94 04:27:11 -0400, Tim Peters <email@example.com> said:
> t> The problem I hit is that I want to write a "substitute" function that
> t> takes the string and does the substitution, but once I cross the caller/
> t> callee boundary I can't get at the caller's namespaces. So substituting
> t> for names of ordinary variables becomes a real puzzler, short of
> t> explicitly building and passing a shadow dict of "interesting" names in
> t> the caller. Got a better idea in mind?
> Does my suggestion above help?
And, although I posted an 'upglobal' function for Tim, I didn't read
closely WHAT *exactly* he wanted it for, or I would have suggested
THEN that the dictionary ought to be an explicit argument. You might
JUST as likely want to substitute from a special (user-created)
symbol-table dict, as you would from the variables in the namspace
Unless the dictionary values are all strings, they ought to have
some optional format+lenght specifiers in the syntax. Even if they
ARE strings, it would be nice to be able to specify the size of the
would *almost* work -- except for floating point formats :-(
As long as we're all digging down into our wish lists, maybe
someone can come up with a syntax scheme that will allow both
numeric printf style format specification, and some sort of
template substitution that preserves the column alignment between
the format string and the output string.
-- Steve Majewski (804-982-0831) <sdm7g@Virginia.EDU> --
-- UVA Department of Molecular Physiology and Biological Physics --
-- Box 449 Health Science Center Charlottesville,VA 22908 --
[ "Cognitive Science is where Philosophy goes when it dies ...
if it hasn't been good!" - Jerry Fodor ]