Module Expr Str Import alias Assign NameStore CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Num Num Assign NameStore CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Num Num If NameLoad body FunctionDef arguments args NameParam defaults body If Call NameLoad NameLoad NameLoad body Return NameLoad Return Call AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam defaults body If Call NameLoad NameLoad NameLoad body Return Call AttributeLoad NameLoad attr Str Str Return NameLoad decorator_list ImportFrom alias identifier ImportFrom alias orelse FunctionDef arguments args NameParam defaults body If Call NameLoad NameLoad NameLoad body Return Call AttributeLoad NameLoad attr Str Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If Call NameLoad NameLoad NameLoad body Return NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Return Call NameLoad NameLoad Str Str decorator_list ImportFrom alias ImportFrom alias Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str
N/A N/A 
Python2.5 and Python3.3 compatibility shim

Heavily inspirted by the "six" library.
https://pypi.python.org/pypi/six
 N/A sys N/A PY2 N/A N/A N/A sys version_info N/A 0 2 N/A PY3 N/A N/A N/A sys version_info N/A 0 3 N/A PY3 N/A b N/A N/A s N/A N/A N/A N/A isinstance s bytes N/A N/A s N/A N/A N/A s encode utf8 replace N/A u N/A N/A s N/A N/A N/A N/A isinstance s bytes N/A N/A N/A N/A s decode utf8 replace N/A s N/A io BytesIO StringIO configparser RawConfigParser N/A b N/A N/A s N/A N/A N/A N/A isinstance s unicode N/A N/A N/A N/A s encode utf8 replace N/A s N/A u N/A N/A s N/A N/A N/A N/A isinstance s unicode N/A N/A s N/A N/A isinstance s int N/A N/A s N/A str s N/A N/A unicode s utf8 replace N/A StringIO StringIO ConfigParser RawConfigParser N/A N/A b __doc__ Ensure we have a byte string N/A N/A u __doc__ Ensure we have a unicode string