← Back
Editing: basestring.cpython-38.pyc
U ,�]� � @ s` d Z ddlZddlmZmZ er$eZejdd� ZG dd� de �Z G dd� dee ��ZdgZdS ) z� 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) � N)�with_metaclass�PY2� c @ s e Zd Zdd� Zdd� ZdS )�BaseBaseStringc C s t |ttf�S �N)� isinstance�bytes�str)�cls�instance� r �7/usr/lib/python3/dist-packages/past/types/basestring.py�__instancecheck__ s z BaseBaseString.__instancecheck__c C s t �d S r )�NotImplemented)r �thingr r r �__subclasshook__ s zBaseBaseString.__subclasshook__N)�__name__� __module__�__qualname__r r r r r r r s r c @ s e Zd ZdZdS )� basestringzC A minimal backport of the Python 2 basestring type to Py3 N)r r r �__doc__r r r r r ! s r ) r �sysZ past.utilsr r Zunicoder �version_infoZver�typer r �__all__r r r r �<module> s
Save File
Cancel