stagejas.blogg.se

Instal Flats
Instal Flats











instal Flats instal Flats

The nested instances need not be of the same type: > tuple ( flats ()])) ( 1, 2, 3, 4, 5, 6, 7 ) > list ( flats ()) > list ( flats ()) Any instance of the Iterable class or the Generator class is considered to be an instance of a container type by this library: > from flats import flats > list ( flats (, ])) This library provides a function that can flatten any instance of a container type that is the root of a tree of nested instances of container types, returning as an iterable the sequence of all objects or values (that are not of a container type) encountered during an in-order traversal. The library can be imported in the usual ways: import flats from flats import flats Examples

instal Flats

This library is available as a package on PyPI: python -m pip install flats Minimal library that enables flattening of nested instances of container types.













Instal Flats