]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool.py: Add a comment about coding style.
authorCollin Funk <collin.funk1@gmail.com>
Thu, 18 Apr 2024 18:03:00 +0000 (11:03 -0700)
committerBruno Haible <bruno@clisp.org>
Fri, 19 Apr 2024 11:50:57 +0000 (13:50 +0200)
* pygnulib/main.py: Add a note about the common convention of using an
underscore prefix to mark a function/variable as private.

ChangeLog
pygnulib/main.py

index 4c676da6f8c8acbbb7f86bb0e4c0a3f354da5ccd..25caba51c530aaa3169b453a7d1f254f90bd0faa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-04-19  Collin Funk  <collin.funk1@gmail.com>
+
+       gnulib-tool.py: Add a comment about coding style.
+       * pygnulib/main.py: Add a note about the common convention of using an
+       underscore prefix to mark a function/variable as private.
+
 2024-04-19  Collin Funk  <collin.funk1@gmail.com>
 
        gnulib-tool.py: Remove some unused instance variables.
index fd39cf07a68f7115f6b88e80a58a9de1c2632751..8316c0abf28dd3ecc55fd87ff7f824a287d3db19 100644 (file)
@@ -54,6 +54,9 @@
 #   Cf. <https://peps.python.org/pep-0585/>.
 # - Never use the {} literal, because it denotes a dictionary,
 #   as opposed to {x}, {x,y}, etc., which denote sets.
+# - Use a leading underscore to indicate that functions and instance variables
+#   should be considered private. This is a widely accepted convention from
+#   PEP 8 <https://peps.python.org/pep-0008/#method-names-and-instance-variables>.
 
 # You can use this command to check the style:
 #   $ pycodestyle *.py