Skip to main content
The :py:mod:`protostrings` distribution provides string-like objects with functional aspects, integrating well with the standard string type. Each :py:mod:`protostring` simply wraps a function dictating specific behaviours within the overarching constraints of the type. Due to their dynamic nature, features such as length or indexing are not supported. Memoizing variants of each :py:mod:`protostring` type are provided. The :py:mod:`inspect` module is required only for visualing :py:mod:`protostrings` (:py:meth:`~.LazyString.__str__`, :py:meth:`~.LazyString.__repr__`, :py:meth:`~.LazyString.pprint`), and is thus a soft requirement.

>>> protostring = "alpha " + ((lazy_str + context_str_right) + context_str_both) + " omega"
>>> protostring.pprint(False)
LazyString (...)
LazyString (...)
str 'alpha '
LazyString (...)
ContextString (...)
LazyString ()
ContextString (...)
ContextString (...)
str ' omega'
>>> str(protostring)
'alpha @@everything else@@ omega'
>>> "...alpha " + (context_str_right + context_str_both) + " omega..."
'...alpha (everything else) omega...'

Metadata

Release files for protostrings 1.0.0

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

Source distribution (sdist)

Source distribution for protostrings 1.0.0
File Size Uploaded
protostrings-1.0.0.0.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for protostrings 1.0.0
File Interpreter ABI Platform
protostrings-1.0.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.4 kB

Release files / protostrings-1.0.0.0.tar.gz

Download URL protostrings-1.0.0.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
26c5929ca0c1fad2e5b837b6f46f034625ac2d6a98eb9c59c0276570f2db573c
BLAKE2b-256 checksum
How to use checksums
665d4f01aa7284b191161cb6086547de4b7966a4eb11a0544e63cc5e82b5db15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / protostrings-1.0.0.0-py3-none-any.whl

Download URL protostrings-1.0.0.0-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a5131999043cc1cf2b51932f5384000474775d053898380c6f9ae291a816dbc4
BLAKE2b-256 checksum
How to use checksums
94f3e2aa65e2b48a44060a78279e5ad76d776287ee7d7f22adaf82ffcf884d99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

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