[Python-Dev] PEP 292, Simpler String Substitutions

Fredrik Lundh fredrik@pythonware.com
Wed, 19 Jun 2002 22:29:20 +0200


Tim Peters wrote:

> [Andrew Kuchling]
> > +1 on /F's suggestion of recycling the os.path.expandvars() code.
> 
> -1 on that part:  os.path.expandvars() is an ill-defined mess (the core has
> more than one of them, varying by platform, and what they do differs in
> platform-irrelevant ways).  +1 on making Barry fix expandvars <wink>:

I'm pretty sure my plan was to change *path.expandvars to

    def expandvars(string):
        return string.expandvars(string, os.environ)

(and I've already sent SRE-based expandvars code to barry,
so all he has to do is to check it in ;-)

</F>