�
c��jl* � �� � d Z ddlZddlZddlZddlZddlZddlZddlZddlm Z dgZ
d� Zd� Ze
j Z d� Z G d � d
� Z G d� deej$ � Z G d
� de� Zdd�Z G d� d� Zy)z�
A Path-like interface for zipfiles.
This codebase is shared between zipfile.Path in the stdlib
and zipp in PyPI. See
https://github.com/python/importlib_metadata/wiki/Development-Methodology
for more detail.
� N� )� translate�Pathc �B � t j t | � dd� S )a2
Given a path with elements separated by
posixpath.sep, generate all parents of that path.
>>> list(_parents('b/d'))
['b']
>>> list(_parents('/b/d/'))
['/b']
>>> list(_parents('b/d/f/'))
['b/d', 'b']
>>> list(_parents('b'))
[]
>>> list(_parents(''))
[]
r N)� itertools�islice� _ancestry)�paths �//usr/lib64/python3.12/zipfile/_path/__init__.py�_parentsr s � � ���I�d�O�Q��5�5� c # � K � | j t j � } | j t j � r=| �� t j | � \ } }| j t j � r�