Functional String Building
Project description
Example #1
import stringbuilder
@stringbuilder
def buildstring():
yield "foo"
yield 1234
yield object()
yield "bar"
mystring = buildstring(delim='
')
print(mystring)
Output:
foo
1234
<object object at 0xdeadbeefcafe>
bar
Example #2
@stringbuilder.build(delim='
')
def mystring():
yield "foo"
yield 1234
yield object()
yield "bar"
print(mystring)
Output:
foo
1234
<object object at 0xdeadbeefcafe>
bar
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
File details
Details for the file stringbuilder.py-2.0.0.tar.gz
.
File metadata
- Download URL: stringbuilder.py-2.0.0.tar.gz
- Upload date:
- Size: 1.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59031c1cd9c63039ae067624c4bb179f925a992842b6e83c9e8ea035d9e8da56 |
|
MD5 | 62e56e3fdf67b5019ce57757f0a9e2ca |
|
BLAKE2b-256 | ae5dbdf4c3ce14a4de1e11927bacf406c861879db9df6028fc421c542b90d60e |