File: //lib/python3/dist-packages/pikepdf/__pycache__/_cpphelpers.cpython-38.pyc
U
~^ � @ sB d Z ddlZddlZejdd� dkr0dd� ZnejZdd� ZdS ) z�
Support functions called by the C++ library binding layer. Not intended to be
called from Python, and subject to change at any time.
� N� )� � c C s� ddl }t| ttf�r| S t| �}z|�| �} W n8 tk
rh t| |j�rXt| � Y S t|d�rd� Y n&X t| ttf�r|| S t dt| �j
��t d|j
��dS )z,https://www.python.org/dev/peps/pep-0519/#osr N�
__fspath__z2expected __fspath__() to return str or bytes, not z=expected str, bytes, pathlib.Path or os.PathLike object, not )�pathlib�
isinstance�str�bytes�typer �AttributeError�Path�hasattr� TypeError�__name__)�pathr � path_type� r �5/usr/lib/python3/dist-packages/pikepdf/_cpphelpers.py�fspath s.
����r c C s. | j ddd��}d|kr ||d<