Skip to main content

A set class for case-insensitive strings.

Project description

Case-insensitive string set

A Python package providing an ordered set class for case-insensitive strings.

Useful for doing things like foo in bar where bar is a set of strings and you want the check to be case-insensitive, but also preserve the original casing of the strings in the set when iterating over it.

Inside the CaseInsensitiveStringSet class, a dictionary is used to store the data, which means that insertion order is preserved in Python >= 3.7.

Examples

>>> c = CaseInsensitiveStringSet()
>>> c.add("a")
>>> 'a' in c
True
>>> 'A' in c
True
>>> 'b' in c
False
>>> list(c)
['a']
>>> c.add("A")
>>> list(c)
['a']

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

case_insensitive_string_set-1.1.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

case_insensitive_string_set-1.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file case_insensitive_string_set-1.1.0.tar.gz.

File metadata

File hashes

Hashes for case_insensitive_string_set-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c0b37a47aa8d75d754a2300dc042aa2e342a97b1da1f41d8af26448287b0fa93
MD5 b8d3f95dc5a2fb3173c942f0e76baa53
BLAKE2b-256 765997dc9a0e2a42493ffd0926a34ea1a674004f2d6a28e8b0f57508811fdc7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for case_insensitive_string_set-1.1.0.tar.gz:

Publisher: publish.yml on AutoActuary/case_insensitive_string_set

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file case_insensitive_string_set-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for case_insensitive_string_set-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d3e455987e3e64000ceb594483f13d0667ec9b7d00a2441a90af94b6839d934
MD5 5c2291d802ec3044381b367cc9caccbe
BLAKE2b-256 67040d4227184750edcfc70fbe25b34b58d0d1344a03bc7fec6be6832ea5ffb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for case_insensitive_string_set-1.1.0-py3-none-any.whl:

Publisher: publish.yml on AutoActuary/case_insensitive_string_set

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page