string.Formatter - pydoc - phpman

Look up a command

 

Markdown Format | JSON API | MCP Server Tool


Help on class Formatter in string:

string.Formatter = 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 (if defined)
 |
 |  __weakref__
 |      list of weak references to the object (if defined)


Generated by phpMan Author: Che Dong Under GNU General Public License
2026-06-02 06:17 @216.73.216.198 CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 TransitionalValid CSS!