{
    "mode": "pydoc",
    "parameter": "string",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/string/json",
    "generated": "2026-06-02T13:17:51Z",
    "sections": {
        "NAME": {
            "content": "string - A collection of string constants.\n",
            "subsections": []
        },
        "MODULE REFERENCE": {
            "content": "https://docs.python.org/3.10/library/string.html\n\nThe following documentation is automatically generated from the Python\nsource files.  It may be incomplete, incorrect or include features that\nare considered implementation detail and may vary between Python\nimplementations.  When in doubt, consult the module reference at the\nlocation listed above.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Public module variables:\n\nwhitespace -- a string containing all ASCII whitespace\nasciilowercase -- a string containing all ASCII lowercase letters\nasciiuppercase -- a string containing all ASCII uppercase letters\nasciiletters -- a string containing all ASCII letters\ndigits -- a string containing all ASCII decimal digits\nhexdigits -- a string containing all ASCII hexadecimal digits\noctdigits -- a string containing all ASCII octal digits\npunctuation -- a string containing all ASCII punctuation characters\nprintable -- a string containing all ASCII characters considered printable\n",
            "subsections": []
        },
        "CLASSES": {
            "content": "builtins.object\nFormatter\nTemplate\n",
            "subsections": [
                {
                    "name": "class Formatter",
                    "content": "|  Methods defined here:\n|\n|  checkunusedargs(self, usedargs, args, kwargs)\n|\n|  convertfield(self, value, conversion)\n|\n|  format(self, formatstring, /, *args, kwargs)\n|\n|  formatfield(self, value, formatspec)\n|\n|  getfield(self, fieldname, args, kwargs)\n|      # given a fieldname, find the object it references.\n|      #  fieldname:   the field being looked up, e.g. \"0.name\"\n|      #                 or \"lookup[3]\"\n|      #  usedargs:    a set of which args have been used\n|      #  args, kwargs: as passed in to vformat\n|\n|  getvalue(self, key, args, kwargs)\n|\n|  parse(self, formatstring)\n|      # returns an iterable that contains tuples of the form:\n|      # (literaltext, fieldname, formatspec, conversion)\n|      # literaltext can be zero length\n|      # fieldname can be None, in which case there's no\n|      #  object to format and output\n|      # if fieldname is not None, it is looked up, formatted\n|      #  with formatspec and conversion and then used\n|\n|  vformat(self, formatstring, args, kwargs)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class Template",
                    "content": "|  Template(template)\n|\n|  A string class for supporting $-substitutions.\n|\n|  Methods defined here:\n|\n|  init(self, template)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  safesubstitute(self, mapping={}, /, kws)\n|\n|  substitute(self, mapping={}, /, kws)\n|\n|  ----------------------------------------------------------------------\n|  Class methods defined here:\n|\n|  initsubclass() from builtins.type\n|      This method is called when a class is subclassed.\n|\n|      The default implementation does nothing. It may be\n|      overridden to extend subclasses.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  braceidpattern = None\n|\n|  delimiter = '$'\n|\n|  flags = re.IGNORECASE\n|\n|  idpattern = '(?a:[a-z][a-z0-9]*)'\n|\n|  pattern = re.compile('\\n            \\\\$(?:\\n              ...identifie...\n"
                }
            ]
        },
        "FUNCTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "capwords",
                    "content": "capwords(s [,sep]) -> string\n\nSplit the argument into words using split, capitalize each\nword using capitalize, and join the capitalized words using\njoin.  If the optional second argument sep is absent or None,\nruns of whitespace characters are replaced by a single space\nand leading and trailing whitespace are removed, otherwise\nsep is used to split and join the words.\n"
                }
            ]
        },
        "DATA": {
            "content": "all = ['asciiletters', 'asciilowercase', 'asciiuppercase', 'cap...\nasciiletters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'\nasciilowercase = 'abcdefghijklmnopqrstuvwxyz'\nasciiuppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\ndigits = '0123456789'\nhexdigits = '0123456789abcdefABCDEF'\noctdigits = '01234567'\nprintable = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTU...\npunctuation = '!\"#$%&\\'()*+,-./:;<=>?@[\\\\]^`{|}~'\nwhitespace = ' \\t\\n\\r\\x0b\\x0c'\n",
            "subsections": []
        },
        "FILE": {
            "content": "/usr/lib/python3.10/string.py\n\n",
            "subsections": []
        }
    },
    "summary": "string - A collection of string constants.",
    "flags": [],
    "examples": [],
    "see_also": []
}