string API Reference
Full documentation for string (Standard Library / Native)
string.Formatter
Python Library Documentation: class Formatter in module string class Formatter(builtins.object) | Methods defined here: | | check_unused_args(self, used_args, args, kwargs) | | convert_field(self, value, conversion) | | format(self, format_string, /, *args, **kwargs) | | format_field(self, value, format_spec) | | get_field(self, field_name, args, kwargs) | # given a field_name, find the object it references. | # field_name: the field being looked up, e.g. "0.name" | # or "lookup[3]" | # used_args: a set of which args have been used | # args, kwargs: as passed in to vformat | | get_value(self, key, args, kwargs) | | parse(self, format_string) | # returns an iterable that contains tuples of the form: | # (literal_text, field_name, format_spec, conversion) | # literal_text can be zero length | # field_name can be None, in which case there's no | # object to format and output | # if field_name is not None, it is looked up, formatted | # with format_spec and conversion and then used | | vformat(self, format_string, args, kwargs) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
string.Template
Python Library Documentation: class Template in module string
class Template(builtins.object)
| Template(template)
|
| A string class for supporting $-substitutions.
|
| Methods defined here:
|
| __init__(self, template)
| Initialize self. See help(type(self)) for accurate signature.
|
| get_identifiers(self)
|
| is_valid(self)
|
| safe_substitute(self, mapping={}, /, **kws)
|
| substitute(self, mapping={}, /, **kws)
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __init_subclass__()
| This method is called when a class is subclassed.
|
| The default implementation does nothing. It may be
| overridden to extend subclasses.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| braceidpattern = None
|
| delimiter = '$'
|
| flags = re.IGNORECASE
|
| idpattern = '(?a:[_a-z][_a-z0-9]*)'
|
| pattern = re.compile('\n \\$(?:\n ...identifie...
string.ascii_letters
Error rendering doc: No Python documentation found for 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
string.ascii_lowercase
Error rendering doc: No Python documentation found for 'abcdefghijklmnopqrstuvwxyz'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
string.ascii_uppercase
Error rendering doc: No Python documentation found for 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
string.capwords
Python Library Documentation: function capwords in module string
capwords(s, sep=None)
capwords(s [,sep]) -> string
Split the argument into words using split, capitalize each
word using capitalize, and join the capitalized words using
join. If the optional second argument sep is absent or None,
runs of whitespace characters are replaced by a single space
and leading and trailing whitespace are removed, otherwise
sep is used to split and join the words.
string.digits
Error rendering doc: No Python documentation found for '0123456789'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
string.hexdigits
Error rendering doc: No Python documentation found for '0123456789abcdefABCDEF'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
string.octdigits
Error rendering doc: No Python documentation found for '01234567'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
string.printable
Error rendering doc: No Python documentation found for '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ \t\n\r\x0b\x0c'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.
string.punctuation
Error rendering doc: No Python documentation found for '!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.
string.whitespace
Error rendering doc: No Python documentation found for ' \t\n\r\x0b\x0c'. Use help() to get the interactive help utility. Use help(str) for help on the str class.