MCPcopy Index your code
hub / github.com/python/cpython / parse

Method parse

Lib/string/__init__.py:289–298  ·  view source on GitHub ↗

Return an iterable that contains tuples of the form (literal_text, field_name, format_spec, conversion). *field_name* can be None, in which case there's no object to format and output; otherwise, it is looked up and formatted with *format_spec* and *conversi

(self, format_string)

Source from the content-addressed store, hash-verified

287 raise ValueError("Unknown conversion specifier {0!s}".format(conversion))
288
289 def parse(self, format_string):
290 """
291 Return an iterable that contains tuples of the form
292 (literal_text, field_name, format_spec, conversion).
293
294 *field_name* can be None, in which case there's no object
295 to format and output; otherwise, it is looked up and
296 formatted with *format_spec* and *conversion*.
297 """
298 return _string.formatter_parser(format_string)
299
300 def get_field(self, field_name, args, kwargs):
301 """Find the object referenced by a given field name.

Callers 1

_vformatMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected