Skip to main content

Functional String Building

Project description

Example #1

import stringbuilder

@stringbuilder
def buildstring():
    yield "foo"
    yield 1234
    yield object()
    yield "bar"

mystring = buildstring(delim='\n')

print(mystring)

Output:

foo
1234
<object object at 0xdeadbeefcafe>
bar

Example #2

@stringbuilder.build(delim='\n')
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

stringbuilder.py-2.0.1.tar.gz (1.3 kB view details)

Uploaded Source

File details

Details for the file stringbuilder.py-2.0.1.tar.gz.

File metadata

  • Download URL: stringbuilder.py-2.0.1.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

Hashes for stringbuilder.py-2.0.1.tar.gz
Algorithm Hash digest
SHA256 14a1e25092541805f908e9f673d2ef2825baf4c8a8275860e6f3116e723df4d9
MD5 7edf9ae3b35037c884a8b2016cfbfe24
BLAKE2b-256 1b7f9f2036649d977eb873a19cd0831b9936cf69cc47b4c7f863f66044609c5c

See more details on using hashes here.

Supported by

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