[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnulib-tool.py: Simplify regular expressions.
From: |
Bruno Haible |
Subject: |
Re: gnulib-tool.py: Simplify regular expressions. |
Date: |
Thu, 11 Apr 2024 21:25:05 +0200 |
Hi Collin,
> I decided to try PyCharm again since I remember liking it when I used
> it ~1 year ago. It seems that it has pretty good warnings for regular
> expressions.
Both patches applied; thanks.
> Patch 0002 removes some redundant backslashing. I am pretty sure most
> of these were introduced by me. We don't need to backslash ']' when it
> is the first character in the '[...]' set. And in the set the special
> characters have their special meaning dropped, so there is no need to
> backslash them.
Oh, this means that r'[x\$]' contains dollar and backslash, whereas the
programmer might have thought that it contains only the dollar? Indeed,
it's worth to listen to these warnings!
Bruno