1
0
forked from s434650/CatOrNot
CatOrNot/venv/lib/python3.6/site-packages/wtforms/compat.py

33 lines
589 B
Python
Raw Normal View History

2018-12-11 00:32:28 +01:00
import sys
__all__ = (
'text_type', 'string_types', 'izip', 'iteritems', 'itervalues',
'with_metaclass',
)
if sys.version_info[0] >= 3:
text_type = str
string_types = (str, )
izip = zip
def iteritems(o):
return o.items()
def itervalues(o):
return o.values()
else:
text_type = unicode
string_types = (basestring, )
from itertools import izip
def iteritems(o):
return o.iteritems()
def itervalues(o):
return o.itervalues()
def with_metaclass(meta, base=object):
return meta("NewBase", (base,), {})