Re: gnulib-tool.py: Make data structures more clear.

2024-04-16 Thread Bruno Haible
Collin Funk wrote: > Patch 0001 changes GLModuleTable's unconditionals member from a > dictionary to a set. > ... > PEP 8 makes this recommendation for 'is not' and 'not ... is' for > similar reasons [1]. Thanks. Both patches applied. Bruno

Re: gnulib-tool.py: Make data structures more clear.

2024-04-16 Thread Collin Funk
700 Subject: [PATCH 1/2] gnulib-tool.py: Make data structures more clear. * pygnulib/GLModuleSystem.py (GLModuleTable.__init__): Use a set to represent the unconditional modules instead of a dictionary. Remove redundant comments. (GLModuleTable.addUnconditional): Add the module to a set instead of

gnulib-tool.py: Make data structures more clear.

2024-04-16 Thread Collin Funk
Patch 0001 changes GLModuleTable's unconditionals member from a dictionary to a set. Since we only use it to check membership in GLModuleTable.addConditional() it is effectively a set anyways. Then in GLModuleTable.addUnconditional() we have: self.unconditionals.add(str(module)) instead of: