On Sun, Feb 25, 2024 at 11:29:51AM -0800, Collin Funk wrote:
> On 2/25/24 3:57 AM, Bruno Haible wrote:
> > The style warnings about "!= None" in pycodestyle and/or pylint are
> > relativized by this warning in Python itself:
> >
> > >>> '' != None
> > True
> > >>> '' is not None
> > :1: Sy
On 2/25/24 11:29 AM, Collin Funk wrote:
> I would hope that it just
> involves a simple configuration file that takes the options we have at
> the top of gnulib-tool.py.
Adding the two attached files to the root directory of gnulib should
adjust the warnings to the agreed upon coding style (as far
Hi Bruno,
On 2/25/24 3:57 AM, Bruno Haible wrote:
> The style warnings about "!= None" in pycodestyle and/or pylint are
> relativized by this warning in Python itself:
>
> >>> '' != None
> True
> >>> '' is not None
> :1: SyntaxWarning: "is not" with a literal. Did you mean "!="?
> True
Hi Bruno,
On 2/25/24 4:02 AM, Bruno Haible wrote:
> * The Python interpreter prints strings with single-quotes:
>
> >>> "abc"
> 'abc'
>
> So, that makes the single-quotes the natural choice.
Interesting find. I don't have super strong feelings on the matter. I
just think that it is best tha
The 'bitset' module accesses an undefined errno in two situations:
1) After calling fread() that reads fewer elements than requested,
and after calling ferror(), the value of errno is undefined.[1][2]
2) After calling fclose() on native Windows, the value of errno is undefined.
[3][4][5]
[1]
Except in particular situations (such as --help messages, where each
translatable string ends with a newline), it is not a good idea to
include a newline at the end of a translatable string, because:
- The decision to add a newline after a certain text is a programmer's
decision; if the tran
Summarizing the rationale to use 'abc' as string syntax:
* PEP 8 https://peps.python.org/pep-0008/#string-quotes
says "In Python, single-quoted strings and double-quoted strings are
the same. This PEP does not make a recommendation for this. Pick a rule
and stick to it."
* When I search whe
Collin Funk wrote:
> One thing that annoys me personally
> is comparing to none using "!=" instead of "is not". This is
> recommended against in PEP 8, "Comparisons to singletons like None
> should always be done with is or is not, never the equality
> operators." [1].
Dima Pasechnik wrote:
> The