Skip to content

Latest commit

 

History

History
34 lines (29 loc) · 1.63 KB

ReadMe.md

File metadata and controls

34 lines (29 loc) · 1.63 KB

more_lists.py Unlicensed work

wheel (GitLab) wheel (GHA via nightly.link) GitLab Build Status GitLab Coverage GitHub Actions N∅ dependencies Libraries.io Status Code style: antiflash

A collection of custom lists classes which may be usable.

SilentList

An analogue of defaultdict - one can insert elements exceeding the length of the list. The gaps will be filled with DEFAULT (which value is 0 by default) - make a subclass to override.

l = SilentList()
l[2] = "a"
l # [None, None, "a"]

CustomBaseList

Allows to create lists which indexes begin from base (by default - from 1, subclass to override).

l = CustomBaseList(
	[
		"a",
		"b",
	]
)
l[2]  # 'b'