Package dns :: Module _compat
[hide private]
[frames] | no frames]

Module _compat

source code

Functions [hide private]
 
maybe_decode(x) source code
 
maybe_encode(x) source code
 
maybe_chr(x) source code
 
maybe_ord(x) source code
 
round_py2_compat(what)
Python 2 and Python 3 use different rounding strategies in round().
source code
Variables [hide private]
  PY3 = False
  PY2 = True
  string_types = (<type 'basestring'>)
  __package__ = 'dns'
Function Details [hide private]

round_py2_compat(what)

source code 

Python 2 and Python 3 use different rounding strategies in round(). This function ensures that results are python2/3 compatible and backward compatible with previous py2 releases :param what: float :return: rounded long