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/2003-May/035633.html below:

[Python-Dev] Re: [Python-checkins] python/dist/src/Lib warnings.py,1.19,1.20

[Python-Dev] Re: [Python-checkins] python/dist/src/Lib warnings.py,1.19,1.20Fred L. Drake, Jr. fdrake@acm.org
Thu, 15 May 2003 08:09:57 -0400
Guido van Rossum writes:
 > Agreed, but you're still using two levels of quoting, and with
 > anything less, "foo.bar" will also match a module named "foolbar".

Agreed.  "foo\.bar" will match "foolbar" as well, but 'foo\.bar' only
matches "foo.bar".  The advantage of single quotes is that you're not
escaping the escape characters with themselves; what's inside the
quotes is simple RE syntax, so you only need to think about one of the
layers at a time.

Either approach works, of course.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation



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