Package proton :: Module _compat
[frames] | no frames]

Module _compat

source code

Utilities to help Proton support both python2 and python3.

Functions
 
raise_(t, v=None, tb=None)
Mimic the old 2.x raise behavior: Raise an exception of type t with value v using optional traceback tb
source code
 
iteritems(d, **kw) source code
 
unichar(i) source code
 
str2bin(s, encoding='latin-1') source code
 
str2unicode(s) source code
Variables
  IS_PY2 = True
  IS_PY3 = False
  INT_TYPES = (<type 'int'>, <type 'long'>)
  TEXT_TYPES = (<type 'unicode'>)
  STRING_TYPES = (<type 'basestring'>)
  BINARY_TYPES = (<type 'str'>)
  CLASS_TYPES = (<type 'type'>, <type 'classobj'>)
  __package__ = 'proton'