diff options
author | Fred Wright <fw@fwright.net> | 2016-04-10 19:29:05 -0700 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2016-04-11 03:24:04 -0400 |
commit | daf3a92073b296559fdba732b29ab8d1a2f3c07c (patch) | |
tree | b95ed0b12686d7b54e08ef83de0ca47011ccb7c6 /gpsprof | |
parent | cbe211fda926cee23bde9bbb59f364a540f5a155 (diff) | |
download | gpsd-daf3a92073b296559fdba732b29ab8d1a2f3c07c.tar.gz |
Fixes gps/*.py to use new-style classes.
Although this isn't strictly a Python 3 requirement, using the
new-style class definition syntax improves consistency between Python
2 and Python 3. Old-style classes have been deprecated since Python
2.2, but many such definitions linger on. Python 3 eliminates
old-style classes, but instead of complaining about old-style
definitions, it simply unconditionally and silently makes all classes
new-style. The only incompatible differences are quite subtle and
rarely matter in practice, but things are more consistent across
versions if the new-style definitions are used.
Also, the preferred method for subclasses to invoke parent init
methods is via the super() construct, which is only available with
new-style classes. Using super() is especially useful with multiple
inheritance, which it handles automatically (provided that the init
methods have compatible signatures).
TESTED:
Ran "scons build-all check valgrind-audit", as well as gegps, gpscat,
gpsprof, xgps, and xgpsspeed, with all six supported Python versions
(except 2.6 for xgps*).
Diffstat (limited to 'gpsprof')
0 files changed, 0 insertions, 0 deletions