← Back
Editing: string_description.cpython-38.pyc
U �b�V� � @ sP d dl mZ d dlZd dlZddlmZ dZdZdZdd � Z G d d� de�Z dS )� )�absolute_importN� )�BaseDescriptionzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txtc C s t t� �| ��S )z�Returns the description of a :py:class:`~hamcrest.core.selfdescribing.SelfDescribing` object as a string. :param selfdescribing: The object to be described. :returns: The description of the object. )�str�StringDescriptionZappend_description_of)Zselfdescribing� r �B/usr/lib/python3/dist-packages/hamcrest/core/string_description.py�tostring s r c @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) r zZA :py:class:`~hamcrest.core.description.Description` that is stored as a string. c C s d| _ d S )N� ��out��selfr r r �__init__ s zStringDescription.__init__c C s | j S )zReturns the description.r r r r r �__str__! s zStringDescription.__str__c C s | j t�|�7 _ d S )N)r �sixZ text_type)r �stringr r r �append% s zStringDescription.appendN)�__name__� __module__�__qualname__�__doc__r r r r r r r r s r )Z __future__r �codecsr Zbase_descriptionr � __author__Z __copyright__Z__license__r r r r r r �<module> s
Save File
Cancel