Notes¶
Though inspired by Perl’s Set::IntSpan, that’s where the similarity stops.
intspan
supports only finite sets, and it follows the methods and conventions of Python’sset
.intspan
methods and operations such asadd()
discard()
, and>=
take integer span strings, lists, and sets as arguments, changing facilities that used to take only one item into ones that take multiple, including arguments that are technically string specifications rather than properintspan
objects.A version of
intspanlist
that doesn’t discard duplicates is under consideration.String representation and
ranges()
method based on Jeff Mercado’s concise answer to this StackOverflow question. Thank you, Jeff!Automated multi-version testing managed with pytest, pytest-cov, coverage and tox. Continuous integration testing with Travis-CI. Packaging linting with pyroma.
Successfully packaged for, and tested against, all current versions of Python including latest builds of 2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6, and 3.7 as well as latest PyPy and PyPy3. Test line coverage 100%.
The author Jonathan Eunice or @jeunice on Twitter welcomes your comments and suggestions.