1
0
Fork 0
flightgear/scripts/python/TerraSync/terrasync
Florent Rougon 13f943b4a1 terrasync.py: rename DirIndex attributes and remove accessors
In Python, common usage is not to define accessors, but to directly use
class or instance attributes (especially when the associated data is
constant after instance creation). If it later happens that a given
attribute needs getter or setter logic, this can always be done via the
@property decorator, and doesn't affect calling code at all. See for
instance:

  https://docs.python.org/3/library/functions.html#property
  https://mail.python.org/pipermail/tutor/2012-December/thread.html#92990

Apply this to the DirIndex class and rename the following attributes for
better readability: f -> files, d -> directories, t -> tarballs.
2020-10-02 16:38:08 +02:00
..
__init__.py terrasync.py: more modular code layout 2018-02-07 11:38:41 +01:00
dirindex.py terrasync.py: rename DirIndex attributes and remove accessors 2020-10-02 16:38:08 +02:00
exceptions.py terrasync.py: user-friendly error message when no 'path' found in .dirindex 2018-02-18 20:22:58 +01:00
main.py terrasync.py: rename DirIndex attributes and remove accessors 2020-10-02 16:38:08 +02:00
virtual_path.py python compatibility: make __ne__ explicit. 2020-10-01 23:06:37 -05:00