""" Module defining the "light" version of typed iterable classes

(i) All typed iterables are extending from a built-in iterable:
list, tuple, set or frozenset.

Specificities
-------------
The "light" version (class name ending in '_lt') 
only ensures the type safety of the current instance.

- Mutating methods that could insert incompatible items are overridden,
they perform type checks, and will fail instead of inserting an incompatible item.

- Non-Mutating methods (except for 'copy' methods) are all still handled by 
the built-in class the typed iterable is based on.
So for example, a TypedList_lt addition, is not type-checked, and will return a built-in list.

The aim is to provide type safety for the current instance only, 
while avoiding slowing down operations that don't direclty affect it.
This makes those operations faster, and more permissive,
but their results are downgraded to built-in iterables.

Exported Classes
----------------
- **TypedList_lt**
- **TypedTuple_lt**
- **TypedSet_lt**
- **TypedFrozenset_lt**

Usage Example:
--------------
>>> # importing 'light' version of typed list class
>>> from typediter import TypedList_lt
>>>
>>> # creating an instance
>>> string_list = TypedList_lt( ('A', 'B', 'C'), i_type=str )
>>>
>>> # supports all the operations of the base built-in iterable
>>> string_list.append( 'D' )
>>> string_list[2] = 'Z'
>>>
>>> # new instances generated by non-mutating operations are built-ins
>>> new_list = string_list + ['E', 'F']
>>> type( new_list ) # -> list
>>>
>>> # trying to insert an incompatible item in the instance,
>>> # will raise a TypeRestrictionError
>>> invalid_instance = TypedList_lt( ( 1, 2, 3 ), i_type=str ) # will raise TypeRestrictionError
>>> string_list.append( 12 ) # will raise TypeRestrictionError
>>>
>>> # Operations returning new instances are not type-restricted:
>>> mixed_list = string_list + [ 1, 2, 3 ] # -> will not fail
"""

from .list import TypedList_lt
from .tuple import TypedTuple_lt
from .set import TypedSet_lt
from .frozenset import TypedFrozenset_lt

__all__ = [ 
    'TypedList_lt', 
    'TypedTuple_lt', 
    'TypedSet_lt', 
    'TypedFrozenset_lt'
]