Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Synopsis

concon (CONstrained CONtainers) provides usefully constrained container subtypes:

  • frozenlist

  • frozendict

  • frozenset - (Note this is a synonym for the builtin frozenset for completeness.)

  • appendonlylist

  • appendonlydict

  • appendonlyset

Examples

>>> import concon
>>> d = concon.appendonlydict()
>>> d['foo'] = 'bar'
>>> d.items()
[('foo', 'bar')]
>>> d['foo'] = 'quz'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/n/virtualenvs/default/lib/python2.7/site-packages/concon.py", line 102, in setitem_without_overwrite
    raise OverwriteError(key, value, d[key])
concon.OverwriteError: Attempted overwrite of key 'foo' with new value 'quz' overwriting old value 'bar'
>>> l = concon.frozenlist(['a', 'b', 'c'])
>>> l[1]
'b'
>>> l.append(42)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/n/virtualenvs/default/lib/python2.7/site-packages/concon.py", line 37, in blocked_method
    raise cls(self, method.__name__, a, kw)
concon.ConstraintError: Attempt to call ['a', 'b', 'c'].append (42,) {} violates constraint.
>>> l[2] = 42
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/n/virtualenvs/default/lib/python2.7/site-packages/concon.py", line 37, in blocked_method
    raise cls(self, method.__name__, a, kw)
concon.ConstraintError: Attempt to call ['a', 'b', 'c'].__setitem__ (2, 42) {} violates constraint.

Metadata

Release files for concon 1.39f12a0e86e50b0895d998c8c5b8d00e80d7abb6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for concon 1.39f12a0e86e50b0895d998c8c5b8d00e80d7abb6
File Size Uploaded Provenance Actions
concon-1.39f12a0e86e50b0895d998c8c5b8d00e80d7abb6.tar.gz 4.5 kB Without provenance Details for concon-1.39f12a0e86e50b0895d998c8c5b8d00e80d7abb6.tar.gz

Release files / concon-1.39f12a0e86e50b0895d998c8c5b8d00e80d7abb6.tar.gz

Download URL concon-1.39f12a0e86e50b0895d998c8c5b8d00e80d7abb6.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f6a2f832a0707c2ab2b253681cbd1dc422aae646c4553fb4ea8456b81a4c2746
BLAKE2b-256 checksum
How to use checksums
864339236f8d7d4d2c2682978fed8fee765be5e81130a3befb721c870f936373
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for concon 1.39f12a0e86e50b0895d998c8c5b8d00e80d7abb6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page