░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
server.ktm001.com
LOCATION:
/usr/local/lib/python3.9/site-packages/past/types
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: basestring.py
""" An implementation of the basestring type for Python 3 Example use: >>> s = b'abc' >>> assert isinstance(s, basestring) >>> from past.types import str as oldstr >>> s2 = oldstr(b'abc') >>> assert isinstance(s2, basestring) """ import sys from past.utils import with_metaclass, PY2 if PY2: str = unicode ver = sys.version_info[:2] class BaseBaseString(type): def __instancecheck__(cls, instance): return isinstance(instance, (bytes, str)) def __subclasscheck__(cls, subclass): return super(BaseBaseString, cls).__subclasscheck__(subclass) or issubclass(subclass, (bytes, str)) class basestring(with_metaclass(BaseBaseString)): """ A minimal backport of the Python 2 basestring type to Py3 """ __all__ = ['basestring']
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📁 __pycache__/
DIR
—
2026-05-04 05:37
📄 __init__.py
PY
879 B
2026-05-04 05:37
EDIT
📄 basestring.py
PY
774 B
2026-05-04 05:37
EDIT
📄 olddict.py
PY
2.7 KB
2026-05-04 05:37
EDIT
📄 oldstr.py
PY
4.2 KB
2026-05-04 05:37
EDIT