<s> import sys <EOL> PY2K = sys . version_info [ <NUM_LIT:0> ] == <NUM_LIT:2> <EOL> if not PY2K : <EOL> map , zip , filter = map , zip , filter <EOL> from functools import reduce <EOL> iteritems = lambda dikt : iter ( dikt . items ( ) ) <EOL> text_type = str <EOL> string_types = ( str , ) <EOL> buffer = memoryview <EOL> else : <EOL> from itertools import imap , izip , ifilter <EOL> map , zip , filter = imap , izip , ifilter <EOL> reduce = reduce <EOL> iteritems = lambda dikt : dikt . iteritems ( ) <EOL> text_type = unicode <EOL> string_types = ( str , unicode ) <EOL> buffer = buffer </s>
