From 229e2648deca809c84cc1c139092547105a07fde Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Thu, 18 Apr 2024 11:03:00 -0700 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ pygnulib/main.py | 3 +++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4c676da6f8..25caba51c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-04-19 Collin Funk + + 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 gnulib-tool.py: Remove some unused instance variables. diff --git a/pygnulib/main.py b/pygnulib/main.py index fd39cf07a6..8316c0abf2 100644 --- a/pygnulib/main.py +++ b/pygnulib/main.py @@ -54,6 +54,9 @@ # Cf. . # - 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 . # You can use this command to check the style: # $ pycodestyle *.py -- 2.39.5