Python 3 division

Hal Murray hmurray at megapathdsl.net
Tue Dec 5 09:30:12 UTC 2017


Several of our python modules don't import division from __future__
Maybe that's because they don't do any divides.  I think it would be simpler 
to always include division so we don't have to remember to see if we need to 
add it every time we a chunk of code that does a divide.

[murray at hgm raw]$ grep __future__ . -r | grep -v division
./pylib/agentx.py:from __future__ import print_function
./pylib/__init__.py:from __future__ import absolute_import  # Ensure Python2 
behaves like Python 3
./wscript:from __future__ import print_function
./tests/pylib/test_util.py:from __future__ import print_function
./ntpclients/ntploggps.py:from __future__ import print_function
./ntpclients/ntpkeygen.py:from __future__ import print_function
./ntpclients/ntptrace.py:from __future__ import print_function
./ntpclients/ntpsweep.py:from __future__ import print_function
./wafhelpers/test.py:from __future__ import print_function
./wafhelpers/bin_test.py:from __future__ import print_function
./contrib/zone-temp-log:from __future__ import print_function
./contrib/ntpconfigtest:from __future__ import print_function
./contrib/temper-temp-log:from __future__ import print_function
[murray at hgm raw]$

-- 
These are my opinions.  I hate spam.





More information about the devel mailing list