Advanced String Formatting for Python >= 2.4
Project description
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
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
StringFormat-0.5.tar.gz
(10.8 kB
view details)
File details
Details for the file StringFormat-0.5.tar.gz
.
File metadata
- Download URL: StringFormat-0.5.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9f22724f84accb8e8db60a0d49f08712a7e1c2c346162ce1536389077db7a9d |
|
MD5 | 88ea58da0c17c66d05c527c70f4c914d |
|
BLAKE2b-256 | 291ceb571296afd851fde78591c78b83968a0d05627b6d2c257ec980a1160884 |