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

Source Code for Module dns._compat

 1  import sys 
 2   
 3   
 4  if sys.version_info > (3,): 
 5      long = int 
 6      xrange = range 
 7  else: 
 8      long = long 
 9      xrange = xrange 
10   
11  # unicode / binary types 
12  if sys.version_info > (3,): 
13      text_type = str 
14      binary_type = bytes 
15      string_types = (str,) 
16      unichr = chr 
17  else: 
18      text_type = unicode 
19      binary_type = str 
20      string_types = (basestring,) 
21      unichr = unichr 
22