why no camelCase in PEP 8?
Barry Scott
barry at barrys-emacs.org
Tue May 19 04:02:35 EDT 2020
> On 18 May 2020, at 22:07, Eli the Bearded <*@eli.users.panix.com> wrote:
>
> camelCase -> noCamelCase
> snake_case -> no_snake_case
>
> One of those is easier to "grep" for than the other.
I guess you mean that a case-sensitive grep can tell
camelCase from noCamelCase.
In all cases you need to use a \b to mark the boundary of the word.
Otherwise the RE will match more than you expect, assuming a
large set of identifiers.
grep '\bsnake_case\b *.py
Barry
More information about the Python-list
mailing list