argparse.Namespace
argparse.Namespace is a Python function in the Argparse Module category. The default namespace object used by parse_args(). The syntax is argparse.Namespace(**kwargs). Returns: Namespace object. A typical example: ns = argparse.Namespace(input="file.txt", verbose=True). A close sibling is argparse.ArgumentParser(), which creates an argument parser for processing command-line arguments. A close sibling is argparse.add_argument(), which defines a command-line argument the parser should accept. A close sibling is argparse.parse_args(), which parses the command-line arguments and returns a Namespace object. More about this category: Command-line argument parsing — ArgumentParser, add_argument. For a broader walkthrough, read the Argparse Module guide. Related Argparse Module entries: argparse.ArgumentParser(), argparse.add_argument(), argparse.parse_args(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details. You can try argparse.Namespace immediately in the Python playground, look up unfamiliar terms in the glossary, or return to the Python Reference homepage.