
    z|ae                         d dl mZ d Zd ZdS )    )OrderedDictc                 B    | d         d         pd| d         d         f}|S )zReturns appropriate key for sorting attribute names

    Attribute names are a tuple of ``(namespace, name)`` where namespace can be
    ``None`` or a string. These can't be compared in Python 3, so we conver the
    ``None`` to an empty string.

    r        )attrkeys     ,lib/python3.11/site-packages/bleach/utils.py	_attr_keyr      s(     71:d1gaj
(CJ    c                     | s| S t          d t          |                                 t                    D                       S )zBTakes a dict of attributes (or None) and returns them alphabetizedc                     g | ]	\  }}||f
S r   r   ).0kvs      r
   
<listcomp>z*alphabetize_attributes.<locals>.<listcomp>   s     PPP41aAPPPr   )r	   )r   sorteditemsr   )attrss    r
   alphabetize_attributesr      sA     PP6%++--Y+O+O+OPPPQQQr   N)collectionsr   r   r   r   r   r
   <module>r      sD    # # # # # #	 	 	R R R R Rr   