{
    "mode": "pydoc",
    "parameter": "atexit",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/atexit/json",
    "generated": "2026-06-02T15:53:01Z",
    "sections": {
        "NAME": {
            "content": "atexit\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "allow programmer to define multiple exit functions to be executed\nupon normal program termination.\n\nTwo public functions, register and unregister, are defined.\n",
            "subsections": []
        },
        "FUNCTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "register",
                    "content": "register(func, *args, kwargs) -> func\n\nRegister a function to be executed upon normal program termination\n\nfunc - function to be called at exit\nargs - optional arguments to pass to func\nkwargs - optional keyword arguments to pass to func\n\nfunc is returned to facilitate usage as a decorator.\n"
                },
                {
                    "name": "unregister",
                    "content": "unregister(func) -> None\n\nUnregister an exit function which was previously registered using\natexit.register\n\nfunc - function to be unregistered\n"
                }
            ]
        },
        "FILE": {
            "content": "(built-in)\n\n",
            "subsections": []
        }
    },
    "summary": "atexit",
    "flags": [],
    "examples": [],
    "see_also": []
}