Skip to main content

StringFormat is an independent port of the Python 3 advanced string formatting, compatible with Python >= 2.4. This implementation is pure Python.

Add the method str.format only if it is missing (Python < 2.6):

import stringformat

stringformat.init()

Enable auto-numbering fields ("{} {}" instead of "{0} {1}") with Python 2.6 also:

import sys
import stringformat

if sys.version_info < (2, 7):
    stringformat.init(True)

The advanced string formatting is officially included in the language since Python 2.6.

http://docs.python.org/whatsnew/2.6.html#pep-3101-advanced-string-formatting

Release files for StringFormat 0.5

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

Source distribution (sdist)

Source distribution for StringFormat 0.5
File Size Uploaded
StringFormat-0.5.tar.gz 10.8 kB Details

Release files / StringFormat-0.5.tar.gz

Download URL StringFormat-0.5.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a9f22724f84accb8e8db60a0d49f08712a7e1c2c346162ce1536389077db7a9d
BLAKE2b-256 checksum
How to use checksums
291ceb571296afd851fde78591c78b83968a0d05627b6d2c257ec980a1160884
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.5 This release

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

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