mirror of https://github.com/flaggo/pydu.git
add compat.strbytes_types which includes all types about string.
This commit is contained in:
parent
54a9753c54
commit
08ea58781c
|
@ -45,6 +45,10 @@ Compat
|
|||
|
||||
The string types are ``(str, unicode)`` on PY2 or ``(str,)`` on PY3.
|
||||
|
||||
.. py:data:: pydu.compat.strbytes_types
|
||||
|
||||
The string types are ``(str, unicode, bytes)`` on PY2 or ``(str, bytes)`` on PY3.
|
||||
|
||||
|
||||
.. py:data:: pydu.compat.numeric_types
|
||||
|
||||
|
|
|
@ -36,10 +36,12 @@ else:
|
|||
if PY2:
|
||||
text_type = unicode
|
||||
string_types = (str, unicode)
|
||||
strbytes_types = (str, unicode, bytes)
|
||||
numeric_types = (int, long)
|
||||
else:
|
||||
text_type = str
|
||||
string_types = (str,)
|
||||
strbytes_types = (str, bytes)
|
||||
numeric_types = (int,)
|
||||
|
||||
# imap
|
||||
|
|
Loading…
Reference in New Issue