o
    /hM                     @   s   d Z dgZG dd deZdS )zBStyleSheetList implements DOM Level 2 Style Sheets StyleSheetList.StyleSheetListc                   @   s(   e Zd ZdZdd Zedd ddZdS )	r   a  Interface `StyleSheetList` (introduced in DOM Level 2)

    The `StyleSheetList` interface provides the abstraction of an ordered
    collection of :class:`~cssutils.stylesheets.StyleSheet` objects.

    The items in the `StyleSheetList` are accessible via an integral index,
    starting from 0.

    This Python implementation is based on a standard Python list so e.g.
    allows ``examplelist[index]`` usage.
    c                 C   s    z| | W S  t y   Y dS w )z
        Used to retrieve a style sheet by ordinal `index`. If `index` is
        greater than or equal to the number of style sheets in the list,
        this returns ``None``.
        N)
IndexError)selfindex r   W/var/www/html/myenv/lib/python3.10/site-packages/cssutils/stylesheets/stylesheetlist.pyitem   s
   
zStyleSheetList.itemc                 C   s   t | S )N)len)r   r   r   r   <lambda>   s    zStyleSheetList.<lambda>zThe number of :class:`StyleSheet` objects in the list. The range  of valid child stylesheet indices is 0 to length-1 inclusive.)docN)__name__
__module____qualname____doc__r   propertylengthr   r   r   r   r      s    
N)r   __all__listr   r   r   r   r   <module>   s    