A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-July/006640.html below:

[Python-Dev] posixpath module.

[Python-Dev] posixpath module. [Python-Dev] posixpath module.Fredrik Lundh Fredrik Lundh" <effbot@telia.com
Sat, 15 Jul 2000 21:22:42 +0200
alex wrote:
>
> Should posixpath.expandvars throw a SyntaxError if it encounters
> unbalanced curly braces?
>=20
> >>> import posixpath
> >>> posixpath.expandvars('/dir1/dir${DIR_NUM/dir2')
> '/dir1/dir${DIR_NUM/dir2'
> >>>=20

probably not; code using it might not be prepared
to handle an exception...

what does the Unix shell do in this case?

(intuitively, I'd treat ${FOO as $FOO, say:

    _varprog =3D re.compile(r'\$(\{[^{}$]*\}|{?\w+|)')

but that's me...)

</F>




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4