관리-도구
편집 파일: mklabels.cpython-310.pyc
o ƚRe � @ sh d Z ddlZzddlmZ W n ey ddlmZ Y nw dd� Zdd� Zedkr2e ed �� dS dS ) z� webencodings.mklabels ~~~~~~~~~~~~~~~~~~~~~ Regenarate the webencodings.labels module. :copyright: Copyright 2012 by Simon Sapin :license: BSD, see LICENSE for details. � N)�urlopenc C s | | � � ksJ �| S �N)�lower)�string� r ��/builddir/build/BUILDROOT/alt-python310-pip-21.3.1-3.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/pip/_vendor/webencodings/mklabels.py�assert_lower s r c sf dg}dd� t �t| ��� �d��D �}tdd� |D ��� |�� fdd�|D �� |�d� d �|�S ) Na """ webencodings.labels ~~~~~~~~~~~~~~~~~~~ Map encoding labels to their name. :copyright: Copyright 2012 by Simon Sapin :license: BSD, see LICENSE for details. """ # XXX Do not edit! # This file is automatically generated by mklabels.py LABELS = { c S sL g | ]"}|d D ]}|d D ]}t t|���d�t |d ��d�f�qqqS )� encodings�labels�u�name)�reprr �lstrip)�.0�category�encoding�labelr r r � <listcomp>, s ���� �zgenerate.<locals>.<listcomp>�asciic s s � | ] \}}t |�V qd S r ��len�r r r r r r � <genexpr>2 s � zgenerate.<locals>.<genexpr>c 3 s. � | ]\}}d |d� t |� |f V qdS )z %s:%s %s, � Nr r ��max_lenr r r 3 s � � ��}� ) �json�loadsr �read�decode�max�extend�append�join)�url�partsr r r r �generate s �� r( �__main__z.http://encoding.spec.whatwg.org/encodings.json) �__doc__r �urllibr �ImportError�urllib.requestr r( �__name__�printr r r r �<module> s �!�