File: //usr/local/lib/python3.6/site-packages/pptx/compat/__pycache__/python3.cpython-36.pyc
3
Zƍh� � @ s8 d Z ddlmZ dd� Zdd� Zdd� Zd d
� ZeZdS )z(Provides Python 3 compatibility objects.� )�BytesIOc C s
t | t�S )z:
Return True if *obj* is an int, False otherwise.
)�
isinstance�int)�obj� r �=/usr/local/lib/python3.6/site-packages/pptx/compat/python3.py�
is_integer s r c C s
t | t�S )z<
Return True if *obj* is a string, False otherwise.
)r �str)r r r r � is_string s r
c C s
t | t�S )zD
Return True if *obj* is a unicode string, False otherwise.
)r r )r r r r �
is_unicode s r c C sF t | t�r| S y
| jd�S tk
r@ tdt| �| f ��Y nX dS )z�Return *text* as a (unicode) str.
*text* can be str or bytes. A bytes object is assumed to be encoded as UTF-8.
If *text* is a str object it is returned unchanged.
zutf-8z(expected unicode string, got %s value %sN)r r �decode�AttributeError� TypeError�type)�textr r r �
to_unicode s
r N) �__doc__�ior r r
r r r ZUnicoder r r r �<module> s