diff --git a/.tags b/.tags new file mode 100644 index 0000000..b5d97c7 --- /dev/null +++ b/.tags @@ -0,0 +1,188 @@ +!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ +!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ +!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ +!_TAG_PROGRAM_NAME Exuberant Ctags // +!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ +!_TAG_PROGRAM_VERSION Development // +AIAssistant examples/ai_optimized.py /^class AIAssistant:$/;" c +BaseMCPServer mcp_servers/base.py /^class BaseMCPServer(ABC):$/;" c +ConfigLoader mcp_browser/config.py /^class ConfigLoader:$/;" c +DEFAULT_CONFIG mcp_browser/config.py /^ DEFAULT_CONFIG = {$/;" v class:ConfigLoader +Decision mcp_servers/memory/memory_server.py /^class Decision:$/;" c +GenerateAIDocs setup.py /^class GenerateAIDocs(Command):$/;" c +JsonRpcBuffer mcp_browser/buffer.py /^class JsonRpcBuffer:$/;" c +MCPBrowser mcp_browser/proxy.py /^class MCPBrowser:$/;" c +MCPBrowserConfig mcp_browser/config.py /^class MCPBrowserConfig:$/;" c +MCPServer mcp_browser/server.py /^class MCPServer:$/;" c +MCPServerConfig mcp_browser/config.py /^class MCPServerConfig:$/;" c +MemoryServer mcp_servers/memory/memory_server.py /^class MemoryServer(BaseMCPServer):$/;" c +MessageFilter mcp_browser/filter.py /^class MessageFilter:$/;" c +MultiServerManager mcp_browser/multi_server.py /^class MultiServerManager:$/;" c +OnboardingServer mcp_servers/onboarding/onboarding_server.py /^class OnboardingServer(BaseMCPServer):$/;" c +Pattern mcp_servers/memory/memory_server.py /^class Pattern:$/;" c +PatternServer mcp_servers/pattern_manager/pattern_server.py /^class PatternServer(BaseMCPServer):$/;" c +ScreenServer mcp_servers/screen/screen_server.py /^class ScreenServer(BaseMCPServer):$/;" c +Task mcp_servers/memory/memory_server.py /^class Task:$/;" c +TestMCPBrowser tests/test_basic.py /^class TestMCPBrowser:$/;" c +TestMessageFilter tests/test_basic.py /^class TestMessageFilter:$/;" c +TestToolRegistry tests/test_basic.py /^class TestToolRegistry:$/;" c +ToolRegistry mcp_browser/registry.py /^class ToolRegistry:$/;" c +VirtualToolHandler mcp_browser/filter.py /^class VirtualToolHandler:$/;" c +__aenter__ mcp_browser/proxy.py /^ async def __aenter__(self):$/;" m class:MCPBrowser file: +__aexit__ mcp_browser/proxy.py /^ async def __aexit__(self, exc_type, exc_val, exc_tb):$/;" m class:MCPBrowser file: +__all__ mcp_browser/__init__.py /^__all__ = ["MCPBrowser"]/;" v +__init__ examples/ai_optimized.py /^ def __init__(self):$/;" m class:AIAssistant +__init__ mcp_browser/buffer.py /^ def __init__(self):$/;" m class:JsonRpcBuffer +__init__ mcp_browser/config.py /^ def __init__(self, config_path: Optional[Path] = None):$/;" m class:ConfigLoader +__init__ mcp_browser/filter.py /^ def __init__(self, registry: ToolRegistry, server_callback: Callable):$/;" m class:VirtualToolHandler +__init__ mcp_browser/filter.py /^ def __init__(self, registry: ToolRegistry, sparse_mode: bool = True):$/;" m class:MessageFilter +__init__ mcp_browser/multi_server.py /^ def __init__(self, debug: bool = False):$/;" m class:MultiServerManager +__init__ mcp_browser/proxy.py /^ def __init__(self, config_path: Optional[Path] = None, server_name: Optional[str] = None,$/;" m class:MCPBrowser +__init__ mcp_browser/registry.py /^ def __init__(self):$/;" m class:ToolRegistry +__init__ mcp_browser/server.py /^ def __init__(self, config: MCPServerConfig, debug: bool = False):$/;" m class:MCPServer +__init__ mcp_servers/base.py /^ def __init__(self, name: str, version: str = "1.0.0"):$/;" m class:BaseMCPServer +__init__ mcp_servers/memory/memory_server.py /^ def __init__(self):$/;" m class:MemoryServer +__init__ mcp_servers/onboarding/onboarding_server.py /^ def __init__(self):$/;" m class:OnboardingServer +__init__ mcp_servers/pattern_manager/pattern_server.py /^ def __init__(self):$/;" m class:PatternServer +__init__ mcp_servers/screen/screen_server.py /^ def __init__(self):$/;" m class:ScreenServer +__version__ mcp_browser/__init__.py /^__version__ = "0.1.0"$/;" v +_add_pattern mcp_servers/pattern_manager/pattern_server.py /^ async def _add_pattern(self, args: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:PatternServer +_create_session mcp_servers/screen/screen_server.py /^ async def _create_session(self, args: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:ScreenServer +_decision_add mcp_servers/memory/memory_server.py /^ async def _decision_add(self, args: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:MemoryServer +_delete_onboarding mcp_servers/onboarding/onboarding_server.py /^ async def _delete_onboarding(self, args: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:OnboardingServer +_execute_command mcp_servers/screen/screen_server.py /^ async def _execute_command(self, args: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:ScreenServer +_execute_pattern mcp_servers/pattern_manager/pattern_server.py /^ async def _execute_pattern(self, args: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:PatternServer +_export_onboarding mcp_servers/onboarding/onboarding_server.py /^ async def _export_onboarding(self, args: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:OnboardingServer +_filter_tools_response mcp_browser/filter.py /^ def _filter_tools_response(self, message: dict) -> dict:$/;" m class:MessageFilter +_find_config_file mcp_browser/config.py /^ def _find_config_file(self) -> Optional[Path]:$/;" m class:ConfigLoader +_format_onboarding mcp_servers/onboarding/onboarding_server.py /^ def _format_onboarding(self, identity: str, data: Dict[str, Any]) -> str:$/;" m class:OnboardingServer +_forward_to_server mcp_browser/proxy.py /^ async def _forward_to_server(self, request: dict) -> dict:$/;" m class:MCPBrowser +_get_builtin_servers mcp_browser/multi_server.py /^ def _get_builtin_servers(self) -> Dict[str, MCPServerConfig]:$/;" m class:MultiServerManager +_handle_call mcp_browser/filter.py /^ async def _handle_call(self, message: dict) -> dict:$/;" m class:VirtualToolHandler +_handle_discover mcp_browser/filter.py /^ async def _handle_discover(self, message: dict) -> dict:$/;" m class:VirtualToolHandler +_handle_message mcp_browser/server.py /^ async def _handle_message(self, message: dict):$/;" m class:MCPServer +_handle_onboarding mcp_servers/onboarding/onboarding_server.py /^ async def _handle_onboarding(self, args: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:OnboardingServer +_handle_server_message mcp_browser/proxy.py /^ def _handle_server_message(self, message: dict):$/;" m class:MCPBrowser +_initialize_connection mcp_browser/proxy.py /^ async def _initialize_connection(self):$/;" m class:MCPBrowser +_kill_session mcp_servers/screen/screen_server.py /^ async def _kill_session(self, args: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:ScreenServer +_knowledge_add mcp_servers/memory/memory_server.py /^ async def _knowledge_add(self, args: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:MemoryServer +_knowledge_get mcp_servers/memory/memory_server.py /^ async def _knowledge_get(self, args: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:MemoryServer +_list_identities mcp_servers/onboarding/onboarding_server.py /^ async def _list_identities(self) -> Dict[str, Any]:$/;" m class:OnboardingServer +_list_patterns mcp_servers/pattern_manager/pattern_server.py /^ async def _list_patterns(self) -> Dict[str, Any]:$/;" m class:PatternServer +_list_sessions mcp_servers/screen/screen_server.py /^ async def _list_sessions(self) -> Dict[str, Any]:$/;" m class:ScreenServer +_load_json mcp_servers/memory/memory_server.py /^ def _load_json(self, filename: str, default: Any) -> Any:$/;" m class:MemoryServer +_load_memory mcp_servers/memory/memory_server.py /^ def _load_memory(self):$/;" m class:MemoryServer +_load_patterns mcp_servers/pattern_manager/pattern_server.py /^ def _load_patterns(self) -> Dict[str, Dict[str, Any]]:$/;" m class:PatternServer +_matches_pattern mcp_servers/pattern_manager/pattern_server.py /^ def _matches_pattern(self, text: str, trigger: List[str]) -> bool:$/;" m class:PatternServer +_memory_summary mcp_servers/memory/memory_server.py /^ async def _memory_summary(self) -> Dict[str, Any]:$/;" m class:MemoryServer +_merge_configs mcp_browser/config.py /^ def _merge_configs(self, base: Dict[str, Any], override: Dict[str, Any]):$/;" m class:ConfigLoader +_pattern_add mcp_servers/memory/memory_server.py /^ async def _pattern_add(self, args: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:MemoryServer +_pattern_resolve mcp_servers/memory/memory_server.py /^ async def _pattern_resolve(self, args: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:MemoryServer +_peek_session mcp_servers/screen/screen_server.py /^ async def _peek_session(self, args: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:ScreenServer +_process_response mcp_servers/pattern_manager/pattern_server.py /^ async def _process_response(self, response: Any, context: Dict[str, Any]) -> str:$/;" m class:PatternServer +_process_single_response mcp_servers/pattern_manager/pattern_server.py /^ async def _process_single_response(self, response: str, context: Dict[str, Any]) -> str:$/;" m class:PatternServer +_project_switch mcp_servers/memory/memory_server.py /^ async def _project_switch(self, args: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:MemoryServer +_read_stderr mcp_browser/server.py /^ async def _read_stderr(self):$/;" m class:MCPServer +_read_stdout mcp_browser/server.py /^ async def _read_stdout(self):$/;" m class:MCPServer +_register_tools mcp_servers/memory/memory_server.py /^ def _register_tools(self):$/;" m class:MemoryServer +_register_tools mcp_servers/onboarding/onboarding_server.py /^ def _register_tools(self):$/;" m class:OnboardingServer +_register_tools mcp_servers/pattern_manager/pattern_server.py /^ def _register_tools(self):$/;" m class:PatternServer +_register_tools mcp_servers/screen/screen_server.py /^ def _register_tools(self):$/;" m class:ScreenServer +_remove_pattern mcp_servers/pattern_manager/pattern_server.py /^ async def _remove_pattern(self, args: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:PatternServer +_run_command mcp_servers/screen/screen_server.py /^ async def _run_command(self, cmd: List[str]) -> subprocess.CompletedProcess:$/;" m class:ScreenServer +_sanitize_identity mcp_servers/onboarding/onboarding_server.py /^ def _sanitize_identity(self, identity: str) -> str:$/;" m class:OnboardingServer +_save_json mcp_servers/memory/memory_server.py /^ def _save_json(self, filename: str, data: Any):$/;" m class:MemoryServer +_save_patterns mcp_servers/pattern_manager/pattern_server.py /^ def _save_patterns(self):$/;" m class:PatternServer +_task_add mcp_servers/memory/memory_server.py /^ async def _task_add(self, args: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:MemoryServer +_task_list mcp_servers/memory/memory_server.py /^ async def _task_list(self, args: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:MemoryServer +_task_update mcp_servers/memory/memory_server.py /^ async def _task_update(self, args: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:MemoryServer +_test_pattern mcp_servers/pattern_manager/pattern_server.py /^ async def _test_pattern(self, args: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:PatternServer +add_message_handler mcp_browser/server.py /^ def add_message_handler(self, handler: Callable[[dict], None]):$/;" m class:MCPServer +add_server mcp_browser/multi_server.py /^ async def add_server(self, name: str, config: MCPServerConfig):$/;" m class:MultiServerManager +append mcp_browser/buffer.py /^ def append(self, data: str) -> List[dict]:$/;" m class:JsonRpcBuffer +async_main mcp_browser/__main__.py /^async def async_main(browser: MCPBrowser):$/;" f +author setup.py /^ author="AI Assistant",$/;" v +author_email setup.py /^ author_email="ai@anthropic.com",$/;" v +call mcp_browser/proxy.py /^ async def call(self, jsonrpc_object: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:MCPBrowser +classifiers setup.py /^ classifiers=[$/;" v +clear mcp_browser/buffer.py /^ def clear(self):$/;" m class:JsonRpcBuffer +close examples/ai_optimized.py /^ async def close(self):$/;" m class:AIAssistant +close mcp_browser/proxy.py /^ async def close(self):$/;" m class:MCPBrowser +cmdclass setup.py /^ cmdclass={$/;" v +content_text mcp_servers/base.py /^ def content_text(self, text: str) -> Dict[str, Any]:$/;" m class:BaseMCPServer +create_browser mcp_browser/proxy.py /^async def create_browser(config_path: Optional[Path] = None, $/;" f +demo_builtin_servers examples/builtin_servers_demo.py /^async def demo_builtin_servers():$/;" f +demonstrate_mcp_browser examples/complete_demo.py /^async def demonstrate_mcp_browser():$/;" f +description setup.py /^ description = 'Generate documentation for AI navigation'$/;" v class:GenerateAIDocs +description setup.py /^ description="A generic MCP browser with context optimization for AI systems",$/;" v +discover mcp_browser/proxy.py /^ def discover(self, jsonpath: str) -> Any:$/;" m class:MCPBrowser +discover mcp_browser/registry.py /^ def discover(self, jsonpath: str) -> Union[List[Any], Any, None]:$/;" m class:ToolRegistry +entry_points setup.py /^ entry_points={$/;" v +execute_user_request examples/ai_optimized.py /^ async def execute_user_request(self, user_request: str):$/;" m class:AIAssistant +extras_require setup.py /^ extras_require={$/;" v +filter_incoming mcp_browser/filter.py /^ def filter_incoming(self, message: dict) -> Optional[dict]:$/;" m class:MessageFilter +filter_outgoing mcp_browser/filter.py /^ def filter_outgoing(self, message: dict) -> Optional[dict]:$/;" m class:MessageFilter +finalize_options setup.py /^ def finalize_options(self):$/;" m class:GenerateAIDocs +generate_api_summary setup.py /^ def generate_api_summary(self):$/;" m class:GenerateAIDocs +generate_structure_doc setup.py /^ def generate_structure_doc(self):$/;" m class:GenerateAIDocs +get_all_tool_names mcp_browser/registry.py /^ def get_all_tool_names(self) -> List[str]:$/;" m class:ToolRegistry +get_all_tools mcp_browser/multi_server.py /^ async def get_all_tools(self) -> List[Dict[str, Any]]:$/;" m class:MultiServerManager +get_sparse_tools mcp_browser/registry.py /^ def get_sparse_tools(self) -> List[Dict[str, Any]]:$/;" m class:ToolRegistry +get_tool mcp_browser/registry.py /^ def get_tool(self, name: str) -> Optional[Dict[str, Any]]:$/;" m class:ToolRegistry +handle_request mcp_servers/base.py /^ async def handle_request(self, request: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:BaseMCPServer +handle_tool_call mcp_browser/filter.py /^ async def handle_tool_call(self, message: dict) -> Optional[dict]:$/;" m class:VirtualToolHandler +handle_tool_call mcp_servers/base.py /^ async def handle_tool_call(self, tool_name: str, arguments: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:BaseMCPServer +handle_tool_call mcp_servers/memory/memory_server.py /^ async def handle_tool_call(self, tool_name: str, arguments: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:MemoryServer +handle_tool_call mcp_servers/onboarding/onboarding_server.py /^ async def handle_tool_call(self, tool_name: str, arguments: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:OnboardingServer +handle_tool_call mcp_servers/pattern_manager/pattern_server.py /^ async def handle_tool_call(self, tool_name: str, arguments: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:PatternServer +handle_tool_call mcp_servers/screen/screen_server.py /^ async def handle_tool_call(self, tool_name: str, arguments: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:ScreenServer +initialize examples/ai_optimized.py /^ async def initialize(self):$/;" m class:AIAssistant +initialize mcp_browser/proxy.py /^ async def initialize(self):$/;" m class:MCPBrowser +initialize_options setup.py /^ def initialize_options(self):$/;" m class:GenerateAIDocs +install_requires setup.py /^ install_requires=[$/;" v +interactive_mode mcp_browser/__main__.py /^async def interactive_mode(browser: MCPBrowser):$/;" f +is_virtual_tool mcp_browser/filter.py /^ def is_virtual_tool(self, tool_name: str) -> bool:$/;" m class:MessageFilter +keywords setup.py /^ keywords="mcp model-context-protocol ai llm tools json-rpc",$/;" v +load mcp_browser/config.py /^ def load(self) -> MCPBrowserConfig:$/;" m class:ConfigLoader +long_description setup.py /^ long_description = fh.read()$/;" v class:GenerateAIDocs +long_description setup.py /^ long_description=long_description,$/;" v +long_description_content_type setup.py /^ long_description_content_type="text\/markdown",$/;" v +main examples/ai_optimized.py /^async def main():$/;" f +main examples/basic_usage.py /^async def main():$/;" f +main mcp_browser/__main__.py /^def main():$/;" f +mark_handled mcp_browser/filter.py /^ def mark_handled(self, request_id: Union[str, int]):$/;" m class:MessageFilter +name setup.py /^ name="mcp-browser",$/;" v +package_data setup.py /^ package_data={$/;" v +packages setup.py /^ packages=find_packages(),$/;" v +register_tool mcp_servers/base.py /^ def register_tool(self, name: str, description: str, input_schema: Dict[str, Any], $/;" m class:BaseMCPServer +route_tool_call mcp_browser/multi_server.py /^ async def route_tool_call(self, tool_name: str, arguments: Dict[str, Any]) -> Dict[str, Any]:$/;" m class:MultiServerManager +run mcp_servers/base.py /^ async def run(self):$/;" m class:BaseMCPServer +run setup.py /^ def run(self):$/;" m class:GenerateAIDocs +run_server_mode mcp_browser/__main__.py /^async def run_server_mode(browser: MCPBrowser):$/;" f +send_raw mcp_browser/server.py /^ def send_raw(self, message: str):$/;" m class:MCPServer +send_request mcp_browser/server.py /^ async def send_request(self, method: str, params: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:$/;" m class:MCPServer +server mcp_servers/memory/memory_server.py /^ server = MemoryServer()$/;" v class:MemoryServer +server mcp_servers/onboarding/onboarding_server.py /^ server = OnboardingServer()$/;" v class:OnboardingServer +server mcp_servers/pattern_manager/pattern_server.py /^ server = PatternServer()$/;" v class:PatternServer +server mcp_servers/screen/screen_server.py /^ server = ScreenServer()$/;" v class:ScreenServer +set_metadata mcp_browser/registry.py /^ def set_metadata(self, key: str, value: Any):$/;" m class:ToolRegistry +simulate_response tests/test_basic.py /^ async def simulate_response():$/;" f function:TestMCPBrowser.test_call_method +start mcp_browser/server.py /^ async def start(self):$/;" m class:MCPServer +start_builtin_servers mcp_browser/multi_server.py /^ async def start_builtin_servers(self):$/;" m class:MultiServerManager +stop mcp_browser/server.py /^ async def stop(self):$/;" m class:MCPServer +stop_all mcp_browser/multi_server.py /^ async def stop_all(self):$/;" m class:MultiServerManager +test_call_method tests/test_basic.py /^ async def test_call_method(self):$/;" m class:TestMCPBrowser +test_claude_connection test_claude_connection.py /^async def test_claude_connection():$/;" f +test_discover_jsonpath tests/test_basic.py /^ def test_discover_jsonpath(self):$/;" m class:TestToolRegistry +test_discover_method tests/test_basic.py /^ async def test_discover_method(self):$/;" m class:TestMCPBrowser +test_duplicate_error_filtering tests/test_basic.py /^ def test_duplicate_error_filtering(self):$/;" m class:TestMessageFilter +test_initialization tests/test_basic.py /^ async def test_initialization(self):$/;" m class:TestMCPBrowser +test_onboarding test_onboarding.py /^async def test_onboarding():$/;" f +test_sparse_mode_filtering tests/test_basic.py /^ def test_sparse_mode_filtering(self):$/;" m class:TestMessageFilter +test_sparse_tools tests/test_basic.py /^ def test_sparse_tools(self):$/;" m class:TestToolRegistry +test_update_tools tests/test_basic.py /^ def test_update_tools(self):$/;" m class:TestToolRegistry +to_json mcp_browser/registry.py /^ def to_json(self) -> str:$/;" m class:ToolRegistry +update_tools mcp_browser/registry.py /^ def update_tools(self, tools: List[Dict[str, Any]]):$/;" m class:ToolRegistry +url setup.py /^ url="https:\/\/github.com\/anthropics\/mcp-browser",$/;" v +user_options setup.py /^ user_options = []$/;" v class:GenerateAIDocs +version setup.py /^ version="0.1.0",$/;" v diff --git a/docs/API_SUMMARY.md b/docs/API_SUMMARY.md new file mode 100644 index 0000000..5141635 --- /dev/null +++ b/docs/API_SUMMARY.md @@ -0,0 +1,25 @@ +# MCP Browser API Summary + +## Main Classes + + +### MCPBrowser (mcp_browser/proxy.py) + +- `discover()` + +### ToolRegistry (mcp_browser/registry.py) + +- `update_tools()` +- `get_tool()` +- `get_all_tool_names()` +- `discover()` +- `get_sparse_tools()` +- `set_metadata()` +- `to_json()` + +### MCPServer (mcp_browser/server.py) + +- `send_raw()` +- `add_message_handler()` + +### MultiServerManager (mcp_browser/multi_server.py) diff --git a/docs/STRUCTURE.md b/docs/STRUCTURE.md new file mode 100644 index 0000000..b1ed1a4 --- /dev/null +++ b/docs/STRUCTURE.md @@ -0,0 +1,37 @@ +# Project Structure + +``` +./ + setup.py + test_claude_connection.py + test_onboarding.py + docs/ + examples/ + ai_optimized.py + basic_usage.py + builtin_servers_demo.py + complete_demo.py + tests/ + test_basic.py + config/ + mcp_servers/ + base.py + screen/ + screen_server.py + memory/ + memory_server.py + pattern_manager/ + pattern_server.py + onboarding/ + onboarding_server.py + mcp_browser/ + __init__.py + __main__.py + buffer.py + config.py + filter.py + multi_server.py + proxy.py + registry.py + server.py +``` diff --git a/mcp_browser/..html b/mcp_browser/..html new file mode 100644 index 0000000..16a3705 --- /dev/null +++ b/mcp_browser/..html @@ -0,0 +1,7909 @@ + + + + +Python: built-in module builtins + + + + + +
 
builtins
index
(built-in)
+

Built-in functions, types, exceptions, and other objects.

+This module provides direct access to all 'built-in'
+identifiers of Python; for example, builtins.len is
+the full name for the built-in function len().

+This module is not normally accessed explicitly by most
+applications, but can be useful in modules that provide
+objects with the same name as a built-in value, but in
+which the built-in of that name is also needed.

+

+ + + + + +
 
Classes
       
+
object +
+
+
BaseException +
+
+
BaseExceptionGroup +
+
+
ExceptionGroup(BaseExceptionGroup, Exception) +
+
+
Exception +
+
+
ArithmeticError +
+
+
FloatingPointError +
OverflowError +
ZeroDivisionError +
+
+
AssertionError +
AttributeError +
BufferError +
EOFError +
ImportError +
+
+
ModuleNotFoundError +
+
+
LookupError +
+
+
IndexError +
KeyError +
+
+
MemoryError +
NameError +
+
+
UnboundLocalError +
+
+
OSError +
+
+
BlockingIOError +
ChildProcessError +
ConnectionError +
+
+
BrokenPipeError +
ConnectionAbortedError +
ConnectionRefusedError +
ConnectionResetError +
+
+
FileExistsError +
FileNotFoundError +
InterruptedError +
IsADirectoryError +
NotADirectoryError +
PermissionError +
ProcessLookupError +
TimeoutError +
+
+
ReferenceError +
RuntimeError +
+
+
NotImplementedError +
PythonFinalizationError +
RecursionError +
+
+
StopAsyncIteration +
StopIteration +
SyntaxError +
+
+
IndentationError +
+
+
TabError +
+
+
+
+
SystemError +
TypeError +
ValueError +
+
+
UnicodeError +
+
+
UnicodeDecodeError +
UnicodeEncodeError +
UnicodeTranslateError +
+
+
+
+
Warning +
+
+
BytesWarning +
DeprecationWarning +
EncodingWarning +
FutureWarning +
ImportWarning +
PendingDeprecationWarning +
ResourceWarning +
RuntimeWarning +
SyntaxWarning +
UnicodeWarning +
UserWarning +
+
+
+
+
GeneratorExit +
KeyboardInterrupt +
SystemExit +
+
+
bytearray +
bytes +
classmethod +
complex +
dict +
enumerate +
filter +
float +
frozenset +
int +
+
+
bool +
+
+
list +
map +
memoryview +
property +
range +
reversed +
set +
slice +
staticmethod +
str +
super +
tuple +
type +
zip +
+
+
+

+ + + + + + + +
 
class ArithmeticError(Exception)
   Base class for arithmetic errors.
 
 
Method resolution order:
+
ArithmeticError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class AssertionError(Exception)
   Assertion failed.
 
 
Method resolution order:
+
AssertionError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class AttributeError(Exception)
   Attribute not found.
 
 
Method resolution order:
+
AttributeError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__getstate__(self, /)
Helper for pickle.
+ +
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__str__(self, /)
Return str(self).
+ +
+Data descriptors defined here:
+
name
+
attribute name
+
+
obj
+
object
+
+
+Static methods inherited from Exception:
+
__new__(*args, **kwargs) class method of Exception
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class BaseException(object)
   Common base class for all exceptions
 
 Methods defined here:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors defined here:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class BaseExceptionGroup(BaseException)
   A combination of multiple unrelated exceptions.
 
 
Method resolution order:
+
BaseExceptionGroup
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__str__(self, /)
Return str(self).
+ +
derive(self, object, /)
+ +
split(self, object, /)
+ +
subgroup(self, object, /)
+ +
+Class methods defined here:
+
__class_getitem__(object, /)
See PEP 585
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors defined here:
+
exceptions
+
nested exceptions
+
+
message
+
exception message
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class BlockingIOError(OSError)
   I/O operation would block.
 
 
Method resolution order:
+
BlockingIOError
+
OSError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Methods inherited from OSError:
+
__reduce__(self, /)
Helper for pickle.
+ +
__str__(self, /)
Return str(self).
+ +
+Static methods inherited from OSError:
+
__new__(*args, **kwargs) class method of OSError
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors inherited from OSError:
+
characters_written
+
+
errno
+
POSIX exception code
+
+
filename
+
exception filename
+
+
filename2
+
second exception filename
+
+
strerror
+
exception strerror
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class BrokenPipeError(ConnectionError)
   Broken pipe.
 
 
Method resolution order:
+
BrokenPipeError
+
ConnectionError
+
OSError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Methods inherited from OSError:
+
__reduce__(self, /)
Helper for pickle.
+ +
__str__(self, /)
Return str(self).
+ +
+Static methods inherited from OSError:
+
__new__(*args, **kwargs) class method of OSError
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors inherited from OSError:
+
characters_written
+
+
errno
+
POSIX exception code
+
+
filename
+
exception filename
+
+
filename2
+
second exception filename
+
+
strerror
+
exception strerror
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class BufferError(Exception)
   Buffer error.
 
 
Method resolution order:
+
BufferError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class BytesWarning(Warning)
   Base class for warnings about bytes and buffer related problems, mostly
+related to conversion from str or comparing to str.
 
 
Method resolution order:
+
BytesWarning
+
Warning
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class ChildProcessError(OSError)
   Child process error.
 
 
Method resolution order:
+
ChildProcessError
+
OSError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Methods inherited from OSError:
+
__reduce__(self, /)
Helper for pickle.
+ +
__str__(self, /)
Return str(self).
+ +
+Static methods inherited from OSError:
+
__new__(*args, **kwargs) class method of OSError
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors inherited from OSError:
+
characters_written
+
+
errno
+
POSIX exception code
+
+
filename
+
exception filename
+
+
filename2
+
second exception filename
+
+
strerror
+
exception strerror
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class ConnectionAbortedError(ConnectionError)
   Connection aborted.
 
 
Method resolution order:
+
ConnectionAbortedError
+
ConnectionError
+
OSError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Methods inherited from OSError:
+
__reduce__(self, /)
Helper for pickle.
+ +
__str__(self, /)
Return str(self).
+ +
+Static methods inherited from OSError:
+
__new__(*args, **kwargs) class method of OSError
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors inherited from OSError:
+
characters_written
+
+
errno
+
POSIX exception code
+
+
filename
+
exception filename
+
+
filename2
+
second exception filename
+
+
strerror
+
exception strerror
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class ConnectionError(OSError)
   Connection error.
 
 
Method resolution order:
+
ConnectionError
+
OSError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Methods inherited from OSError:
+
__reduce__(self, /)
Helper for pickle.
+ +
__str__(self, /)
Return str(self).
+ +
+Static methods inherited from OSError:
+
__new__(*args, **kwargs) class method of OSError
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors inherited from OSError:
+
characters_written
+
+
errno
+
POSIX exception code
+
+
filename
+
exception filename
+
+
filename2
+
second exception filename
+
+
strerror
+
exception strerror
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class ConnectionRefusedError(ConnectionError)
   Connection refused.
 
 
Method resolution order:
+
ConnectionRefusedError
+
ConnectionError
+
OSError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Methods inherited from OSError:
+
__reduce__(self, /)
Helper for pickle.
+ +
__str__(self, /)
Return str(self).
+ +
+Static methods inherited from OSError:
+
__new__(*args, **kwargs) class method of OSError
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors inherited from OSError:
+
characters_written
+
+
errno
+
POSIX exception code
+
+
filename
+
exception filename
+
+
filename2
+
second exception filename
+
+
strerror
+
exception strerror
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class ConnectionResetError(ConnectionError)
   Connection reset.
 
 
Method resolution order:
+
ConnectionResetError
+
ConnectionError
+
OSError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Methods inherited from OSError:
+
__reduce__(self, /)
Helper for pickle.
+ +
__str__(self, /)
Return str(self).
+ +
+Static methods inherited from OSError:
+
__new__(*args, **kwargs) class method of OSError
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors inherited from OSError:
+
characters_written
+
+
errno
+
POSIX exception code
+
+
filename
+
exception filename
+
+
filename2
+
second exception filename
+
+
strerror
+
exception strerror
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class DeprecationWarning(Warning)
   Base class for warnings about deprecated features.
 
 
Method resolution order:
+
DeprecationWarning
+
Warning
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class EOFError(Exception)
   Read beyond end of file.
 
 
Method resolution order:
+
EOFError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class EncodingWarning(Warning)
   Base class for warnings about encodings.
 
 
Method resolution order:
+
EncodingWarning
+
Warning
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
EnvironmentError = class OSError(Exception)
   Base class for I/O related errors.
 
 
Method resolution order:
+
OSError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__str__(self, /)
Return str(self).
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors defined here:
+
characters_written
+
+
errno
+
POSIX exception code
+
+
filename
+
exception filename
+
+
filename2
+
second exception filename
+
+
strerror
+
exception strerror
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class Exception(BaseException)
   Common base class for all non-exit exceptions.
 
 
Method resolution order:
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + +
 
class ExceptionGroup(BaseExceptionGroup, Exception)
    
Method resolution order:
+
ExceptionGroup
+
BaseExceptionGroup
+
Exception
+
BaseException
+
object
+
+
+Data descriptors defined here:
+
__weakref__
+
list of weak references to the object
+
+
+Methods inherited from BaseExceptionGroup:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__str__(self, /)
Return str(self).
+ +
derive(self, object, /)
+ +
split(self, object, /)
+ +
subgroup(self, object, /)
+ +
+Class methods inherited from BaseExceptionGroup:
+
__class_getitem__(object, /)
See PEP 585
+ +
+Static methods inherited from BaseExceptionGroup:
+
__new__(*args, **kwargs) class method of BaseExceptionGroup
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors inherited from BaseExceptionGroup:
+
exceptions
+
nested exceptions
+
+
message
+
exception message
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class FileExistsError(OSError)
   File already exists.
 
 
Method resolution order:
+
FileExistsError
+
OSError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Methods inherited from OSError:
+
__reduce__(self, /)
Helper for pickle.
+ +
__str__(self, /)
Return str(self).
+ +
+Static methods inherited from OSError:
+
__new__(*args, **kwargs) class method of OSError
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors inherited from OSError:
+
characters_written
+
+
errno
+
POSIX exception code
+
+
filename
+
exception filename
+
+
filename2
+
second exception filename
+
+
strerror
+
exception strerror
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class FileNotFoundError(OSError)
   File not found.
 
 
Method resolution order:
+
FileNotFoundError
+
OSError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Methods inherited from OSError:
+
__reduce__(self, /)
Helper for pickle.
+ +
__str__(self, /)
Return str(self).
+ +
+Static methods inherited from OSError:
+
__new__(*args, **kwargs) class method of OSError
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors inherited from OSError:
+
characters_written
+
+
errno
+
POSIX exception code
+
+
filename
+
exception filename
+
+
filename2
+
second exception filename
+
+
strerror
+
exception strerror
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class FloatingPointError(ArithmeticError)
   Floating-point operation failed.
 
 
Method resolution order:
+
FloatingPointError
+
ArithmeticError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class FutureWarning(Warning)
   Base class for warnings about constructs that will change semantically
+in the future.
 
 
Method resolution order:
+
FutureWarning
+
Warning
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class GeneratorExit(BaseException)
   Request that a generator exit.
 
 
Method resolution order:
+
GeneratorExit
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
IOError = class OSError(Exception)
   Base class for I/O related errors.
 
 
Method resolution order:
+
OSError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__str__(self, /)
Return str(self).
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors defined here:
+
characters_written
+
+
errno
+
POSIX exception code
+
+
filename
+
exception filename
+
+
filename2
+
second exception filename
+
+
strerror
+
exception strerror
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class ImportError(Exception)
   Import can't find module, or can't find name in module.
 
 
Method resolution order:
+
ImportError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__str__(self, /)
Return str(self).
+ +
+Data descriptors defined here:
+
msg
+
exception message
+
+
name
+
module name
+
+
name_from
+
name imported from module
+
+
path
+
module path
+
+
+Static methods inherited from Exception:
+
__new__(*args, **kwargs) class method of Exception
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class ImportWarning(Warning)
   Base class for warnings about probable mistakes in module imports
 
 
Method resolution order:
+
ImportWarning
+
Warning
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class IndentationError(SyntaxError)
   Improper indentation.
 
 
Method resolution order:
+
IndentationError
+
SyntaxError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Methods inherited from SyntaxError:
+
__str__(self, /)
Return str(self).
+ +
+Data descriptors inherited from SyntaxError:
+
end_lineno
+
exception end lineno
+
+
end_offset
+
exception end offset
+
+
filename
+
exception filename
+
+
lineno
+
exception lineno
+
+
msg
+
exception msg
+
+
offset
+
exception offset
+
+
print_file_and_line
+
exception print_file_and_line
+
+
text
+
exception text
+
+
+Static methods inherited from Exception:
+
__new__(*args, **kwargs) class method of Exception
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class IndexError(LookupError)
   Sequence index out of range.
 
 
Method resolution order:
+
IndexError
+
LookupError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class InterruptedError(OSError)
   Interrupted by signal.
 
 
Method resolution order:
+
InterruptedError
+
OSError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Methods inherited from OSError:
+
__reduce__(self, /)
Helper for pickle.
+ +
__str__(self, /)
Return str(self).
+ +
+Static methods inherited from OSError:
+
__new__(*args, **kwargs) class method of OSError
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors inherited from OSError:
+
characters_written
+
+
errno
+
POSIX exception code
+
+
filename
+
exception filename
+
+
filename2
+
second exception filename
+
+
strerror
+
exception strerror
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class IsADirectoryError(OSError)
   Operation doesn't work on directories.
 
 
Method resolution order:
+
IsADirectoryError
+
OSError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Methods inherited from OSError:
+
__reduce__(self, /)
Helper for pickle.
+ +
__str__(self, /)
Return str(self).
+ +
+Static methods inherited from OSError:
+
__new__(*args, **kwargs) class method of OSError
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors inherited from OSError:
+
characters_written
+
+
errno
+
POSIX exception code
+
+
filename
+
exception filename
+
+
filename2
+
second exception filename
+
+
strerror
+
exception strerror
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class KeyError(LookupError)
   Mapping key not found.
 
 
Method resolution order:
+
KeyError
+
LookupError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__str__(self, /)
Return str(self).
+ +
+Static methods inherited from LookupError:
+
__new__(*args, **kwargs) class method of LookupError
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class KeyboardInterrupt(BaseException)
   Program interrupted by user.
 
 
Method resolution order:
+
KeyboardInterrupt
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class LookupError(Exception)
   Base class for lookup errors.
 
 
Method resolution order:
+
LookupError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class MemoryError(Exception)
   Out of memory.
 
 
Method resolution order:
+
MemoryError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class ModuleNotFoundError(ImportError)
   Module not found.
 
 
Method resolution order:
+
ModuleNotFoundError
+
ImportError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Methods inherited from ImportError:
+
__reduce__(self, /)
Helper for pickle.
+ +
__str__(self, /)
Return str(self).
+ +
+Data descriptors inherited from ImportError:
+
msg
+
exception message
+
+
name
+
module name
+
+
name_from
+
name imported from module
+
+
path
+
module path
+
+
+Static methods inherited from Exception:
+
__new__(*args, **kwargs) class method of Exception
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class NameError(Exception)
   Name not found globally.
 
 
Method resolution order:
+
NameError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__str__(self, /)
Return str(self).
+ +
+Data descriptors defined here:
+
name
+
name
+
+
+Static methods inherited from Exception:
+
__new__(*args, **kwargs) class method of Exception
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class NotADirectoryError(OSError)
   Operation only works on directories.
 
 
Method resolution order:
+
NotADirectoryError
+
OSError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Methods inherited from OSError:
+
__reduce__(self, /)
Helper for pickle.
+ +
__str__(self, /)
Return str(self).
+ +
+Static methods inherited from OSError:
+
__new__(*args, **kwargs) class method of OSError
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors inherited from OSError:
+
characters_written
+
+
errno
+
POSIX exception code
+
+
filename
+
exception filename
+
+
filename2
+
second exception filename
+
+
strerror
+
exception strerror
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class NotImplementedError(RuntimeError)
   Method or function hasn't been implemented yet.
 
 
Method resolution order:
+
NotImplementedError
+
RuntimeError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class OSError(Exception)
   Base class for I/O related errors.
 
 
Method resolution order:
+
OSError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__str__(self, /)
Return str(self).
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors defined here:
+
characters_written
+
+
errno
+
POSIX exception code
+
+
filename
+
exception filename
+
+
filename2
+
second exception filename
+
+
strerror
+
exception strerror
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class OverflowError(ArithmeticError)
   Result too large to be represented.
 
 
Method resolution order:
+
OverflowError
+
ArithmeticError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class PendingDeprecationWarning(Warning)
   Base class for warnings about features which will be deprecated
+in the future.
 
 
Method resolution order:
+
PendingDeprecationWarning
+
Warning
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class PermissionError(OSError)
   Not enough permissions.
 
 
Method resolution order:
+
PermissionError
+
OSError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Methods inherited from OSError:
+
__reduce__(self, /)
Helper for pickle.
+ +
__str__(self, /)
Return str(self).
+ +
+Static methods inherited from OSError:
+
__new__(*args, **kwargs) class method of OSError
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors inherited from OSError:
+
characters_written
+
+
errno
+
POSIX exception code
+
+
filename
+
exception filename
+
+
filename2
+
second exception filename
+
+
strerror
+
exception strerror
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class ProcessLookupError(OSError)
   Process not found.
 
 
Method resolution order:
+
ProcessLookupError
+
OSError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Methods inherited from OSError:
+
__reduce__(self, /)
Helper for pickle.
+ +
__str__(self, /)
Return str(self).
+ +
+Static methods inherited from OSError:
+
__new__(*args, **kwargs) class method of OSError
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors inherited from OSError:
+
characters_written
+
+
errno
+
POSIX exception code
+
+
filename
+
exception filename
+
+
filename2
+
second exception filename
+
+
strerror
+
exception strerror
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class PythonFinalizationError(RuntimeError)
   Operation blocked during Python finalization.
 
 
Method resolution order:
+
PythonFinalizationError
+
RuntimeError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class RecursionError(RuntimeError)
   Recursion limit exceeded.
 
 
Method resolution order:
+
RecursionError
+
RuntimeError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class ReferenceError(Exception)
   Weak ref proxy used after referent went away.
 
 
Method resolution order:
+
ReferenceError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class ResourceWarning(Warning)
   Base class for warnings about resource usage.
 
 
Method resolution order:
+
ResourceWarning
+
Warning
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class RuntimeError(Exception)
   Unspecified run-time error.
 
 
Method resolution order:
+
RuntimeError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class RuntimeWarning(Warning)
   Base class for warnings about dubious runtime behavior.
 
 
Method resolution order:
+
RuntimeWarning
+
Warning
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class StopAsyncIteration(Exception)
   Signal the end from iterator.__anext__().
 
 
Method resolution order:
+
StopAsyncIteration
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class StopIteration(Exception)
   Signal the end from iterator.__next__().
 
 
Method resolution order:
+
StopIteration
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Data descriptors defined here:
+
value
+
generator return value
+
+
+Static methods inherited from Exception:
+
__new__(*args, **kwargs) class method of Exception
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class SyntaxError(Exception)
   Invalid syntax.
 
 
Method resolution order:
+
SyntaxError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__str__(self, /)
Return str(self).
+ +
+Data descriptors defined here:
+
end_lineno
+
exception end lineno
+
+
end_offset
+
exception end offset
+
+
filename
+
exception filename
+
+
lineno
+
exception lineno
+
+
msg
+
exception msg
+
+
offset
+
exception offset
+
+
print_file_and_line
+
exception print_file_and_line
+
+
text
+
exception text
+
+
+Static methods inherited from Exception:
+
__new__(*args, **kwargs) class method of Exception
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class SyntaxWarning(Warning)
   Base class for warnings about dubious syntax.
 
 
Method resolution order:
+
SyntaxWarning
+
Warning
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class SystemError(Exception)
   Internal error in the Python interpreter.

+Please report this to the Python maintainer, along with the traceback,
+the Python version, and the hardware/OS platform and version.
 
 
Method resolution order:
+
SystemError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class SystemExit(BaseException)
   Request to exit from the interpreter.
 
 
Method resolution order:
+
SystemExit
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Data descriptors defined here:
+
code
+
exception code
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Static methods inherited from BaseException:
+
__new__(*args, **kwargs) class method of BaseException
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class TabError(IndentationError)
   Improper mixture of spaces and tabs.
 
 
Method resolution order:
+
TabError
+
IndentationError
+
SyntaxError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Methods inherited from SyntaxError:
+
__str__(self, /)
Return str(self).
+ +
+Data descriptors inherited from SyntaxError:
+
end_lineno
+
exception end lineno
+
+
end_offset
+
exception end offset
+
+
filename
+
exception filename
+
+
lineno
+
exception lineno
+
+
msg
+
exception msg
+
+
offset
+
exception offset
+
+
print_file_and_line
+
exception print_file_and_line
+
+
text
+
exception text
+
+
+Static methods inherited from Exception:
+
__new__(*args, **kwargs) class method of Exception
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class TimeoutError(OSError)
   Timeout expired.
 
 
Method resolution order:
+
TimeoutError
+
OSError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Methods inherited from OSError:
+
__reduce__(self, /)
Helper for pickle.
+ +
__str__(self, /)
Return str(self).
+ +
+Static methods inherited from OSError:
+
__new__(*args, **kwargs) class method of OSError
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors inherited from OSError:
+
characters_written
+
+
errno
+
POSIX exception code
+
+
filename
+
exception filename
+
+
filename2
+
second exception filename
+
+
strerror
+
exception strerror
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class TypeError(Exception)
   Inappropriate argument type.
 
 
Method resolution order:
+
TypeError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class UnboundLocalError(NameError)
   Local name referenced but not bound to a value.
 
 
Method resolution order:
+
UnboundLocalError
+
NameError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Methods inherited from NameError:
+
__str__(self, /)
Return str(self).
+ +
+Data descriptors inherited from NameError:
+
name
+
name
+
+
+Static methods inherited from Exception:
+
__new__(*args, **kwargs) class method of Exception
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class UnicodeDecodeError(UnicodeError)
   Unicode decoding error.
 
 
Method resolution order:
+
UnicodeDecodeError
+
UnicodeError
+
ValueError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__str__(self, /)
Return str(self).
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors defined here:
+
encoding
+
exception encoding
+
+
end
+
exception end
+
+
object
+
exception object
+
+
reason
+
exception reason
+
+
start
+
exception start
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class UnicodeEncodeError(UnicodeError)
   Unicode encoding error.
 
 
Method resolution order:
+
UnicodeEncodeError
+
UnicodeError
+
ValueError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__str__(self, /)
Return str(self).
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors defined here:
+
encoding
+
exception encoding
+
+
end
+
exception end
+
+
object
+
exception object
+
+
reason
+
exception reason
+
+
start
+
exception start
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class UnicodeError(ValueError)
   Unicode related error.
 
 
Method resolution order:
+
UnicodeError
+
ValueError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class UnicodeTranslateError(UnicodeError)
   Unicode translation error.
 
 
Method resolution order:
+
UnicodeTranslateError
+
UnicodeError
+
ValueError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__str__(self, /)
Return str(self).
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors defined here:
+
encoding
+
exception encoding
+
+
end
+
exception end
+
+
object
+
exception object
+
+
reason
+
exception reason
+
+
start
+
exception start
+
+
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class UnicodeWarning(Warning)
   Base class for warnings about Unicode related problems, mostly
+related to conversion problems.
 
 
Method resolution order:
+
UnicodeWarning
+
Warning
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class UserWarning(Warning)
   Base class for warnings generated by user code.
 
 
Method resolution order:
+
UserWarning
+
Warning
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class ValueError(Exception)
   Inappropriate argument value (of correct type).
 
 
Method resolution order:
+
ValueError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class Warning(Exception)
   Base class for warning categories.
 
 
Method resolution order:
+
Warning
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class ZeroDivisionError(ArithmeticError)
   Second argument to a division or modulo operation was zero.
 
 
Method resolution order:
+
ZeroDivisionError
+
ArithmeticError
+
Exception
+
BaseException
+
object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from BaseException:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setstate__(self, object, /)
+ +
__str__(self, /)
Return str(self).
+ +
add_note(self, object, /)
Exception.add_note(note) --
+add a note to the exception
+ +
with_traceback(self, object, /)
Exception.with_traceback(tb) --
+set self.__traceback__ to tb and return self.
+ +
+Data descriptors inherited from BaseException:
+
__cause__
+
exception cause
+
+
__context__
+
exception context
+
+
__dict__
+
+
__suppress_context__
+
+
__traceback__
+
+
args
+
+

+ + + + + + + +
 
class bool(int)
   bool(object=False, /)

+Returns True when the argument is true, False otherwise.
+The builtins True and False are the only two instances of the class bool.
+The class bool is a subclass of the class int, and cannot be subclassed.
 
 
Method resolution order:
+
bool
+
int
+
object
+
+
+Methods defined here:
+
__and__(self, value, /)
Return self&value.
+ +
__invert__(self, /)
~self
+ +
__or__(self, value, /)
Return self|value.
+ +
__rand__(self, value, /)
Return value&self.
+ +
__repr__(self, /)
Return repr(self).
+ +
__ror__(self, value, /)
Return value|self.
+ +
__rxor__(self, value, /)
Return value^self.
+ +
__xor__(self, value, /)
Return self^value.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Methods inherited from int:
+
__abs__(self, /)
abs(self)
+ +
__add__(self, value, /)
Return self+value.
+ +
__bool__(self, /)
True if self else False
+ +
__ceil__(self, /)
Ceiling of an Integral returns itself.
+ +
__divmod__(self, value, /)
Return divmod(self, value).
+ +
__eq__(self, value, /)
Return self==value.
+ +
__float__(self, /)
float(self)
+ +
__floor__(self, /)
Flooring an Integral returns itself.
+ +
__floordiv__(self, value, /)
Return self//value.
+ +
__format__(self, format_spec, /)
Convert to a string according to format_spec.
+ +
__ge__(self, value, /)
Return self>=value.
+ +
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__getnewargs__(self, /)
+ +
__gt__(self, value, /)
Return self>value.
+ +
__hash__(self, /)
Return hash(self).
+ +
__index__(self, /)
Return self converted to an integer, if self is suitable for use as an index into a list.
+ +
__int__(self, /)
int(self)
+ +
__le__(self, value, /)
Return self<=value.
+ +
__lshift__(self, value, /)
Return self<<value.
+ +
__lt__(self, value, /)
Return self<value.
+ +
__mod__(self, value, /)
Return self%value.
+ +
__mul__(self, value, /)
Return self*value.
+ +
__ne__(self, value, /)
Return self!=value.
+ +
__neg__(self, /)
-self
+ +
__pos__(self, /)
+self
+ +
__pow__(self, value, mod=None, /)
Return pow(self, value, mod).
+ +
__radd__(self, value, /)
Return value+self.
+ +
__rdivmod__(self, value, /)
Return divmod(value, self).
+ +
__rfloordiv__(self, value, /)
Return value//self.
+ +
__rlshift__(self, value, /)
Return value<<self.
+ +
__rmod__(self, value, /)
Return value%self.
+ +
__rmul__(self, value, /)
Return value*self.
+ +
__round__(self, ndigits=<unrepresentable>, /)
Rounding an Integral returns itself.

+Rounding with an ndigits argument also returns an integer.
+ +
__rpow__(self, value, mod=None, /)
Return pow(value, self, mod).
+ +
__rrshift__(self, value, /)
Return value>>self.
+ +
__rshift__(self, value, /)
Return self>>value.
+ +
__rsub__(self, value, /)
Return value-self.
+ +
__rtruediv__(self, value, /)
Return value/self.
+ +
__sizeof__(self, /)
Returns size in memory, in bytes.
+ +
__sub__(self, value, /)
Return self-value.
+ +
__truediv__(self, value, /)
Return self/value.
+ +
__trunc__(self, /)
Truncating an Integral returns itself.
+ +
as_integer_ratio(self, /)
Return a pair of integers, whose ratio is equal to the original int.

+The ratio is in lowest terms and has a positive denominator.

+>>> (10).as_integer_ratio()
+(10, 1)
+>>> (-10).as_integer_ratio()
+(-10, 1)
+>>> (0).as_integer_ratio()
+(0, 1)
+ +
bit_count(self, /)
Number of ones in the binary representation of the absolute value of self.

+Also known as the population count.

+>>> bin(13)
+'0b1101'
+>>> (13).bit_count()
+3
+ +
bit_length(self, /)
Number of bits necessary to represent self in binary.

+>>> bin(37)
+'0b100101'
+>>> (37).bit_length()
+6
+ +
conjugate(self, /)
Returns self, the complex conjugate of any int.
+ +
is_integer(self, /)
Returns True. Exists for duck type compatibility with float.is_integer.
+ +
to_bytes(self, /, length=1, byteorder='big', *, signed=False)
Return an array of bytes representing an integer.

+length
+  Length of bytes object to use.  An OverflowError is raised if the
+  integer is not representable with the given number of bytes.  Default
+  is length 1.
+byteorder
+  The byte order used to represent the integer.  If byteorder is 'big',
+  the most significant byte is at the beginning of the byte array.  If
+  byteorder is 'little', the most significant byte is at the end of the
+  byte array.  To request the native byte order of the host system, use
+  sys.byteorder as the byte order value.  Default is to use 'big'.
+signed
+  Determines whether two's complement is used to represent the integer.
+  If signed is False and a negative integer is given, an OverflowError
+  is raised.
+ +
+Class methods inherited from int:
+
from_bytes(bytes, byteorder='big', *, signed=False)
Return the integer represented by the given array of bytes.

+bytes
+  Holds the array of bytes to convert.  The argument must either
+  support the buffer protocol or be an iterable object producing bytes.
+  Bytes and bytearray are examples of built-in objects that support the
+  buffer protocol.
+byteorder
+  The byte order used to represent the integer.  If byteorder is 'big',
+  the most significant byte is at the beginning of the byte array.  If
+  byteorder is 'little', the most significant byte is at the end of the
+  byte array.  To request the native byte order of the host system, use
+  sys.byteorder as the byte order value.  Default is to use 'big'.
+signed
+  Indicates whether two's complement is used to represent the integer.
+ +
+Data descriptors inherited from int:
+
denominator
+
the denominator of a rational number in lowest terms
+
+
imag
+
the imaginary part of a complex number
+
+
numerator
+
the numerator of a rational number in lowest terms
+
+
real
+
the real part of a complex number
+
+

+ + + + + + + +
 
class bytearray(object)
   bytearray(iterable_of_ints) -> bytearray
+bytearray(string, encoding[, errors]) -> bytearray
+bytearray(bytes_or_buffer) -> mutable copy of bytes_or_buffer
+bytearray(int) -> bytes array of size given by the parameter initialized with null bytes
+bytearray() -> empty bytes array

+Construct a mutable bytearray object from:
+  - an iterable yielding integers in range(256)
+  - a text string encoded using the specified encoding
+  - a bytes or a buffer object
+  - any object implementing the buffer API.
+  - an integer
 
 Methods defined here:
+
__add__(self, value, /)
Return self+value.
+ +
__alloc__(self, /)
B.__alloc__() -> int

+Return the number of bytes actually allocated.
+ +
__buffer__(self, flags, /)
Return a buffer object that exposes the underlying memory of the object.
+ +
__contains__(self, key, /)
Return bool(key in self).
+ +
__delitem__(self, key, /)
Delete self[key].
+ +
__eq__(self, value, /)
Return self==value.
+ +
__ge__(self, value, /)
Return self>=value.
+ +
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__getitem__(self, key, /)
Return self[key].
+ +
__gt__(self, value, /)
Return self>value.
+ +
__iadd__(self, value, /)
Implement self+=value.
+ +
__imul__(self, value, /)
Implement self*=value.
+ +
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__iter__(self, /)
Implement iter(self).
+ +
__le__(self, value, /)
Return self<=value.
+ +
__len__(self, /)
Return len(self).
+ +
__lt__(self, value, /)
Return self<value.
+ +
__mod__(self, value, /)
Return self%value.
+ +
__mul__(self, value, /)
Return self*value.
+ +
__ne__(self, value, /)
Return self!=value.
+ +
__reduce__(self, /)
Return state information for pickling.
+ +
__reduce_ex__(self, proto=0, /)
Return state information for pickling.
+ +
__release_buffer__(self, buffer, /)
Release the buffer object that exposes the underlying memory of the object.
+ +
__repr__(self, /)
Return repr(self).
+ +
__rmod__(self, value, /)
Return value%self.
+ +
__rmul__(self, value, /)
Return value*self.
+ +
__setitem__(self, key, value, /)
Set self[key] to value.
+ +
__sizeof__(self, /)
Returns the size of the bytearray object in memory, in bytes.
+ +
__str__(self, /)
Return str(self).
+ +
append(self, item, /)
Append a single item to the end of the bytearray.

+item
+  The item to be appended.
+ +
capitalize(self, /)
B.capitalize() -> copy of B

+Return a copy of B with only its first character capitalized (ASCII)
+and the rest lower-cased.
+ +
center(self, width, fillchar=b' ', /)
Return a centered string of length width.

+Padding is done using the specified fill character.
+ +
clear(self, /)
Remove all items from the bytearray.
+ +
copy(self, /)
Return a copy of B.
+ +
count(self, sub[, start[, end]], /)
Return the number of non-overlapping occurrences of subsection 'sub' in bytes B[start:end].

+start
+  Optional start position. Default: start of the bytes.
+end
+  Optional stop position. Default: end of the bytes.
+ +
decode(self, /, encoding='utf-8', errors='strict')
Decode the bytearray using the codec registered for encoding.

+encoding
+  The encoding with which to decode the bytearray.
+errors
+  The error handling scheme to use for the handling of decoding errors.
+  The default is 'strict' meaning that decoding errors raise a
+  UnicodeDecodeError. Other possible values are 'ignore' and 'replace'
+  as well as any other name registered with codecs.register_error that
+  can handle UnicodeDecodeErrors.
+ +
endswith(self, suffix[, start[, end]], /)
Return True if the bytearray ends with the specified suffix, False otherwise.

+suffix
+  A bytes or a tuple of bytes to try.
+start
+  Optional start position. Default: start of the bytearray.
+end
+  Optional stop position. Default: end of the bytearray.
+ +
expandtabs(self, /, tabsize=8)
Return a copy where all tab characters are expanded using spaces.

+If tabsize is not given, a tab size of 8 characters is assumed.
+ +
extend(self, iterable_of_ints, /)
Append all the items from the iterator or sequence to the end of the bytearray.

+iterable_of_ints
+  The iterable of items to append.
+ +
find(self, sub[, start[, end]], /)
Return the lowest index in B where subsection 'sub' is found, such that 'sub' is contained within B[start:end].

+  start
+    Optional start position. Default: start of the bytes.
+  end
+    Optional stop position. Default: end of the bytes.

+Return -1 on failure.
+ +
hex(self, /, sep=<unrepresentable>, bytes_per_sep=1)
Create a string of hexadecimal numbers from a bytearray object.

+  sep
+    An optional single character or byte to separate hex bytes.
+  bytes_per_sep
+    How many bytes between separators.  Positive values count from the
+    right, negative values count from the left.

+Example:
+>>> value = bytearray([0xb9, 0x01, 0xef])
+>>> value.hex()
+'b901ef'
+>>> value.hex(':')
+'b9:01:ef'
+>>> value.hex(':', 2)
+'b9:01ef'
+>>> value.hex(':', -2)
+'b901:ef'
+ +
index(self, sub[, start[, end]], /)
Return the lowest index in B where subsection 'sub' is found, such that 'sub' is contained within B[start:end].

+  start
+    Optional start position. Default: start of the bytes.
+  end
+    Optional stop position. Default: end of the bytes.

+Raise ValueError if the subsection is not found.
+ +
insert(self, index, item, /)
Insert a single item into the bytearray before the given index.

+index
+  The index where the value is to be inserted.
+item
+  The item to be inserted.
+ +
isalnum(self, /)
B.isalnum() -> bool

+Return True if all characters in B are alphanumeric
+and there is at least one character in B, False otherwise.
+ +
isalpha(self, /)
B.isalpha() -> bool

+Return True if all characters in B are alphabetic
+and there is at least one character in B, False otherwise.
+ +
isascii(self, /)
B.isascii() -> bool

+Return True if B is empty or all characters in B are ASCII,
+False otherwise.
+ +
isdigit(self, /)
B.isdigit() -> bool

+Return True if all characters in B are digits
+and there is at least one character in B, False otherwise.
+ +
islower(self, /)
B.islower() -> bool

+Return True if all cased characters in B are lowercase and there is
+at least one cased character in B, False otherwise.
+ +
isspace(self, /)
B.isspace() -> bool

+Return True if all characters in B are whitespace
+and there is at least one character in B, False otherwise.
+ +
istitle(self, /)
B.istitle() -> bool

+Return True if B is a titlecased string and there is at least one
+character in B, i.e. uppercase characters may only follow uncased
+characters and lowercase characters only cased ones. Return False
+otherwise.
+ +
isupper(self, /)
B.isupper() -> bool

+Return True if all cased characters in B are uppercase and there is
+at least one cased character in B, False otherwise.
+ +
join(self, iterable_of_bytes, /)
Concatenate any number of bytes/bytearray objects.

+The bytearray whose method is called is inserted in between each pair.

+The result is returned as a new bytearray object.
+ +
ljust(self, width, fillchar=b' ', /)
Return a left-justified string of length width.

+Padding is done using the specified fill character.
+ +
lower(self, /)
B.lower() -> copy of B

+Return a copy of B with all ASCII characters converted to lowercase.
+ +
lstrip(self, bytes=None, /)
Strip leading bytes contained in the argument.

+If the argument is omitted or None, strip leading ASCII whitespace.
+ +
partition(self, sep, /)
Partition the bytearray into three parts using the given separator.

+This will search for the separator sep in the bytearray. If the separator is
+found, returns a 3-tuple containing the part before the separator, the
+separator itself, and the part after it as new bytearray objects.

+If the separator is not found, returns a 3-tuple containing the copy of the
+original bytearray object and two empty bytearray objects.
+ +
pop(self, index=-1, /)
Remove and return a single item from B.

+  index
+    The index from where to remove the item.
+    -1 (the default value) means remove the last item.

+If no index argument is given, will pop the last item.
+ +
remove(self, value, /)
Remove the first occurrence of a value in the bytearray.

+value
+  The value to remove.
+ +
removeprefix(self, prefix, /)
Return a bytearray with the given prefix string removed if present.

+If the bytearray starts with the prefix string, return
+bytearray[len(prefix):].  Otherwise, return a copy of the original
+bytearray.
+ +
removesuffix(self, suffix, /)
Return a bytearray with the given suffix string removed if present.

+If the bytearray ends with the suffix string and that suffix is not
+empty, return bytearray[:-len(suffix)].  Otherwise, return a copy of
+the original bytearray.
+ +
replace(self, old, new, count=-1, /)
Return a copy with all occurrences of substring old replaced by new.

+  count
+    Maximum number of occurrences to replace.
+    -1 (the default value) means replace all occurrences.

+If the optional argument count is given, only the first count occurrences are
+replaced.
+ +
reverse(self, /)
Reverse the order of the values in B in place.
+ +
rfind(self, sub[, start[, end]], /)
Return the highest index in B where subsection 'sub' is found, such that 'sub' is contained within B[start:end].

+  start
+    Optional start position. Default: start of the bytes.
+  end
+    Optional stop position. Default: end of the bytes.

+Return -1 on failure.
+ +
rindex(self, sub[, start[, end]], /)
Return the highest index in B where subsection 'sub' is found, such that 'sub' is contained within B[start:end].

+  start
+    Optional start position. Default: start of the bytes.
+  end
+    Optional stop position. Default: end of the bytes.

+Raise ValueError if the subsection is not found.
+ +
rjust(self, width, fillchar=b' ', /)
Return a right-justified string of length width.

+Padding is done using the specified fill character.
+ +
rpartition(self, sep, /)
Partition the bytearray into three parts using the given separator.

+This will search for the separator sep in the bytearray, starting at the end.
+If the separator is found, returns a 3-tuple containing the part before the
+separator, the separator itself, and the part after it as new bytearray
+objects.

+If the separator is not found, returns a 3-tuple containing two empty bytearray
+objects and the copy of the original bytearray object.
+ +
rsplit(self, /, sep=None, maxsplit=-1)
Return a list of the sections in the bytearray, using sep as the delimiter.

+  sep
+    The delimiter according which to split the bytearray.
+    None (the default value) means split on ASCII whitespace characters
+    (space, tab, return, newline, formfeed, vertical tab).
+  maxsplit
+    Maximum number of splits to do.
+    -1 (the default value) means no limit.

+Splitting is done starting at the end of the bytearray and working to the front.
+ +
rstrip(self, bytes=None, /)
Strip trailing bytes contained in the argument.

+If the argument is omitted or None, strip trailing ASCII whitespace.
+ +
split(self, /, sep=None, maxsplit=-1)
Return a list of the sections in the bytearray, using sep as the delimiter.

+sep
+  The delimiter according which to split the bytearray.
+  None (the default value) means split on ASCII whitespace characters
+  (space, tab, return, newline, formfeed, vertical tab).
+maxsplit
+  Maximum number of splits to do.
+  -1 (the default value) means no limit.
+ +
splitlines(self, /, keepends=False)
Return a list of the lines in the bytearray, breaking at line boundaries.

+Line breaks are not included in the resulting list unless keepends is given and
+true.
+ +
startswith(self, prefix[, start[, end]], /)
Return True if the bytearray starts with the specified prefix, False otherwise.

+prefix
+  A bytes or a tuple of bytes to try.
+start
+  Optional start position. Default: start of the bytearray.
+end
+  Optional stop position. Default: end of the bytearray.
+ +
strip(self, bytes=None, /)
Strip leading and trailing bytes contained in the argument.

+If the argument is omitted or None, strip leading and trailing ASCII whitespace.
+ +
swapcase(self, /)
B.swapcase() -> copy of B

+Return a copy of B with uppercase ASCII characters converted
+to lowercase ASCII and vice versa.
+ +
title(self, /)
B.title() -> copy of B

+Return a titlecased version of B, i.e. ASCII words start with uppercase
+characters, all remaining cased characters have lowercase.
+ +
translate(self, table, /, delete=b'')
Return a copy with each character mapped by the given translation table.

+  table
+    Translation table, which must be a bytes object of length 256.

+All characters occurring in the optional argument delete are removed.
+The remaining characters are mapped through the given translation table.
+ +
upper(self, /)
B.upper() -> copy of B

+Return a copy of B with all ASCII characters converted to uppercase.
+ +
zfill(self, width, /)
Pad a numeric string with zeros on the left, to fill a field of the given width.

+The original string is never truncated.
+ +
+Class methods defined here:
+
fromhex(string, /)
Create a bytearray object from a string of hexadecimal numbers.

+Spaces between two numbers are accepted.
+Example: bytearray.fromhex('B9 01EF') -> bytearray(b'\\xb9\\x01\\xef')
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
maketrans(frm, to, /)
Return a translation table usable for the bytes or bytearray translate method.

+The returned table will be one where each byte in frm is mapped to the byte at
+the same position in to.

+The bytes objects frm and to must be of the same length.
+ +
+Data and other attributes defined here:
+
__hash__ = None
+ +

+ + + + + + + +
 
class bytes(object)
   bytes(iterable_of_ints) -> bytes
+bytes(string, encoding[, errors]) -> bytes
+bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer
+bytes(int) -> bytes object of size given by the parameter initialized with null bytes
+bytes() -> empty bytes object

+Construct an immutable array of bytes from:
+  - an iterable yielding integers in range(256)
+  - a text string encoded using the specified encoding
+  - any object implementing the buffer API.
+  - an integer
 
 Methods defined here:
+
__add__(self, value, /)
Return self+value.
+ +
__buffer__(self, flags, /)
Return a buffer object that exposes the underlying memory of the object.
+ +
__bytes__(self, /)
Convert this value to exact type bytes.
+ +
__contains__(self, key, /)
Return bool(key in self).
+ +
__eq__(self, value, /)
Return self==value.
+ +
__ge__(self, value, /)
Return self>=value.
+ +
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__getitem__(self, key, /)
Return self[key].
+ +
__getnewargs__(self, /)
+ +
__gt__(self, value, /)
Return self>value.
+ +
__hash__(self, /)
Return hash(self).
+ +
__iter__(self, /)
Implement iter(self).
+ +
__le__(self, value, /)
Return self<=value.
+ +
__len__(self, /)
Return len(self).
+ +
__lt__(self, value, /)
Return self<value.
+ +
__mod__(self, value, /)
Return self%value.
+ +
__mul__(self, value, /)
Return self*value.
+ +
__ne__(self, value, /)
Return self!=value.
+ +
__repr__(self, /)
Return repr(self).
+ +
__rmod__(self, value, /)
Return value%self.
+ +
__rmul__(self, value, /)
Return value*self.
+ +
__str__(self, /)
Return str(self).
+ +
capitalize(self, /)
B.capitalize() -> copy of B

+Return a copy of B with only its first character capitalized (ASCII)
+and the rest lower-cased.
+ +
center(self, width, fillchar=b' ', /)
Return a centered string of length width.

+Padding is done using the specified fill character.
+ +
count(self, sub[, start[, end]], /)
Return the number of non-overlapping occurrences of subsection 'sub' in bytes B[start:end].

+start
+  Optional start position. Default: start of the bytes.
+end
+  Optional stop position. Default: end of the bytes.
+ +
decode(self, /, encoding='utf-8', errors='strict')
Decode the bytes using the codec registered for encoding.

+encoding
+  The encoding with which to decode the bytes.
+errors
+  The error handling scheme to use for the handling of decoding errors.
+  The default is 'strict' meaning that decoding errors raise a
+  UnicodeDecodeError. Other possible values are 'ignore' and 'replace'
+  as well as any other name registered with codecs.register_error that
+  can handle UnicodeDecodeErrors.
+ +
endswith(self, suffix[, start[, end]], /)
Return True if the bytes ends with the specified suffix, False otherwise.

+suffix
+  A bytes or a tuple of bytes to try.
+start
+  Optional start position. Default: start of the bytes.
+end
+  Optional stop position. Default: end of the bytes.
+ +
expandtabs(self, /, tabsize=8)
Return a copy where all tab characters are expanded using spaces.

+If tabsize is not given, a tab size of 8 characters is assumed.
+ +
find(self, sub[, start[, end]], /)
Return the lowest index in B where subsection 'sub' is found, such that 'sub' is contained within B[start,end].

+  start
+    Optional start position. Default: start of the bytes.
+  end
+    Optional stop position. Default: end of the bytes.

+Return -1 on failure.
+ +
hex(self, /, sep=<unrepresentable>, bytes_per_sep=1)
Create a string of hexadecimal numbers from a bytes object.

+  sep
+    An optional single character or byte to separate hex bytes.
+  bytes_per_sep
+    How many bytes between separators.  Positive values count from the
+    right, negative values count from the left.

+Example:
+>>> value = b'\xb9\x01\xef'
+>>> value.hex()
+'b901ef'
+>>> value.hex(':')
+'b9:01:ef'
+>>> value.hex(':', 2)
+'b9:01ef'
+>>> value.hex(':', -2)
+'b901:ef'
+ +
index(self, sub[, start[, end]], /)
Return the lowest index in B where subsection 'sub' is found, such that 'sub' is contained within B[start,end].

+  start
+    Optional start position. Default: start of the bytes.
+  end
+    Optional stop position. Default: end of the bytes.

+Raise ValueError if the subsection is not found.
+ +
isalnum(self, /)
B.isalnum() -> bool

+Return True if all characters in B are alphanumeric
+and there is at least one character in B, False otherwise.
+ +
isalpha(self, /)
B.isalpha() -> bool

+Return True if all characters in B are alphabetic
+and there is at least one character in B, False otherwise.
+ +
isascii(self, /)
B.isascii() -> bool

+Return True if B is empty or all characters in B are ASCII,
+False otherwise.
+ +
isdigit(self, /)
B.isdigit() -> bool

+Return True if all characters in B are digits
+and there is at least one character in B, False otherwise.
+ +
islower(self, /)
B.islower() -> bool

+Return True if all cased characters in B are lowercase and there is
+at least one cased character in B, False otherwise.
+ +
isspace(self, /)
B.isspace() -> bool

+Return True if all characters in B are whitespace
+and there is at least one character in B, False otherwise.
+ +
istitle(self, /)
B.istitle() -> bool

+Return True if B is a titlecased string and there is at least one
+character in B, i.e. uppercase characters may only follow uncased
+characters and lowercase characters only cased ones. Return False
+otherwise.
+ +
isupper(self, /)
B.isupper() -> bool

+Return True if all cased characters in B are uppercase and there is
+at least one cased character in B, False otherwise.
+ +
join(self, iterable_of_bytes, /)
Concatenate any number of bytes objects.

+The bytes whose method is called is inserted in between each pair.

+The result is returned as a new bytes object.

+Example: b'.'.join([b'ab', b'pq', b'rs']) -> b'ab.pq.rs'.
+ +
ljust(self, width, fillchar=b' ', /)
Return a left-justified string of length width.

+Padding is done using the specified fill character.
+ +
lower(self, /)
B.lower() -> copy of B

+Return a copy of B with all ASCII characters converted to lowercase.
+ +
lstrip(self, bytes=None, /)
Strip leading bytes contained in the argument.

+If the argument is omitted or None, strip leading  ASCII whitespace.
+ +
partition(self, sep, /)
Partition the bytes into three parts using the given separator.

+This will search for the separator sep in the bytes. If the separator is found,
+returns a 3-tuple containing the part before the separator, the separator
+itself, and the part after it.

+If the separator is not found, returns a 3-tuple containing the original bytes
+object and two empty bytes objects.
+ +
removeprefix(self, prefix, /)
Return a bytes object with the given prefix string removed if present.

+If the bytes starts with the prefix string, return bytes[len(prefix):].
+Otherwise, return a copy of the original bytes.
+ +
removesuffix(self, suffix, /)
Return a bytes object with the given suffix string removed if present.

+If the bytes ends with the suffix string and that suffix is not empty,
+return bytes[:-len(prefix)].  Otherwise, return a copy of the original
+bytes.
+ +
replace(self, old, new, count=-1, /)
Return a copy with all occurrences of substring old replaced by new.

+  count
+    Maximum number of occurrences to replace.
+    -1 (the default value) means replace all occurrences.

+If the optional argument count is given, only the first count occurrences are
+replaced.
+ +
rfind(self, sub[, start[, end]], /)
Return the highest index in B where subsection 'sub' is found, such that 'sub' is contained within B[start,end].

+  start
+    Optional start position. Default: start of the bytes.
+  end
+    Optional stop position. Default: end of the bytes.

+Return -1 on failure.
+ +
rindex(self, sub[, start[, end]], /)
Return the highest index in B where subsection 'sub' is found, such that 'sub' is contained within B[start,end].

+  start
+    Optional start position. Default: start of the bytes.
+  end
+    Optional stop position. Default: end of the bytes.

+Raise ValueError if the subsection is not found.
+ +
rjust(self, width, fillchar=b' ', /)
Return a right-justified string of length width.

+Padding is done using the specified fill character.
+ +
rpartition(self, sep, /)
Partition the bytes into three parts using the given separator.

+This will search for the separator sep in the bytes, starting at the end. If
+the separator is found, returns a 3-tuple containing the part before the
+separator, the separator itself, and the part after it.

+If the separator is not found, returns a 3-tuple containing two empty bytes
+objects and the original bytes object.
+ +
rsplit(self, /, sep=None, maxsplit=-1)
Return a list of the sections in the bytes, using sep as the delimiter.

+  sep
+    The delimiter according which to split the bytes.
+    None (the default value) means split on ASCII whitespace characters
+    (space, tab, return, newline, formfeed, vertical tab).
+  maxsplit
+    Maximum number of splits to do.
+    -1 (the default value) means no limit.

+Splitting is done starting at the end of the bytes and working to the front.
+ +
rstrip(self, bytes=None, /)
Strip trailing bytes contained in the argument.

+If the argument is omitted or None, strip trailing ASCII whitespace.
+ +
split(self, /, sep=None, maxsplit=-1)
Return a list of the sections in the bytes, using sep as the delimiter.

+sep
+  The delimiter according which to split the bytes.
+  None (the default value) means split on ASCII whitespace characters
+  (space, tab, return, newline, formfeed, vertical tab).
+maxsplit
+  Maximum number of splits to do.
+  -1 (the default value) means no limit.
+ +
splitlines(self, /, keepends=False)
Return a list of the lines in the bytes, breaking at line boundaries.

+Line breaks are not included in the resulting list unless keepends is given and
+true.
+ +
startswith(self, prefix[, start[, end]], /)
Return True if the bytes starts with the specified prefix, False otherwise.

+prefix
+  A bytes or a tuple of bytes to try.
+start
+  Optional start position. Default: start of the bytes.
+end
+  Optional stop position. Default: end of the bytes.
+ +
strip(self, bytes=None, /)
Strip leading and trailing bytes contained in the argument.

+If the argument is omitted or None, strip leading and trailing ASCII whitespace.
+ +
swapcase(self, /)
B.swapcase() -> copy of B

+Return a copy of B with uppercase ASCII characters converted
+to lowercase ASCII and vice versa.
+ +
title(self, /)
B.title() -> copy of B

+Return a titlecased version of B, i.e. ASCII words start with uppercase
+characters, all remaining cased characters have lowercase.
+ +
translate(self, table, /, delete=b'')
Return a copy with each character mapped by the given translation table.

+  table
+    Translation table, which must be a bytes object of length 256.

+All characters occurring in the optional argument delete are removed.
+The remaining characters are mapped through the given translation table.
+ +
upper(self, /)
B.upper() -> copy of B

+Return a copy of B with all ASCII characters converted to uppercase.
+ +
zfill(self, width, /)
Pad a numeric string with zeros on the left, to fill a field of the given width.

+The original string is never truncated.
+ +
+Class methods defined here:
+
fromhex(string, /)
Create a bytes object from a string of hexadecimal numbers.

+Spaces between two numbers are accepted.
+Example: bytes.fromhex('B9 01EF') -> b'\\xb9\\x01\\xef'.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
maketrans(frm, to, /)
Return a translation table usable for the bytes or bytearray translate method.

+The returned table will be one where each byte in frm is mapped to the byte at
+the same position in to.

+The bytes objects frm and to must be of the same length.
+ +

+ + + + + + + +
 
class classmethod(object)
   classmethod(function, /)

+Convert a function to be a class method.

+A class method receives the class as implicit first argument,
+just like an instance method receives the instance.
+To declare a class method, use this idiom:

+  class C:
+      @classmethod
+      def f(cls, arg1, arg2, argN):
+          ...

+It can be called either on the class (e.g. C.f()) or on an instance
+(e.g. C().f()).  The instance is ignored except for its class.
+If a class method is called for a derived class, the derived class
+object is passed as the implied first argument.

+Class methods are different than C++ or Java static methods.
+If you want those, see the staticmethod builtin.
 
 Methods defined here:
+
__get__(self, instance, owner=None, /)
Return an attribute of instance, which is of type owner.
+ +
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__repr__(self, /)
Return repr(self).
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors defined here:
+
__dict__
+
+
__func__
+
+
__isabstractmethod__
+
+
__wrapped__
+
+

+ + + + + + + +
 
class complex(object)
   complex(real=0, imag=0)

+Create a complex number from a string or numbers.

+If a string is given, parse it as a complex number.
+If a single number is given, convert it to a complex number.
+If the 'real' or 'imag' arguments are given, create a complex number
+with the specified real and imaginary components.
 
 Methods defined here:
+
__abs__(self, /)
abs(self)
+ +
__add__(self, value, /)
Return self+value.
+ +
__bool__(self, /)
True if self else False
+ +
__complex__(self, /)
Convert this value to exact type complex.
+ +
__eq__(self, value, /)
Return self==value.
+ +
__format__(self, format_spec, /)
Convert to a string according to format_spec.
+ +
__ge__(self, value, /)
Return self>=value.
+ +
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__getnewargs__(self, /)
+ +
__gt__(self, value, /)
Return self>value.
+ +
__hash__(self, /)
Return hash(self).
+ +
__le__(self, value, /)
Return self<=value.
+ +
__lt__(self, value, /)
Return self<value.
+ +
__mul__(self, value, /)
Return self*value.
+ +
__ne__(self, value, /)
Return self!=value.
+ +
__neg__(self, /)
-self
+ +
__pos__(self, /)
+self
+ +
__pow__(self, value, mod=None, /)
Return pow(self, value, mod).
+ +
__radd__(self, value, /)
Return value+self.
+ +
__repr__(self, /)
Return repr(self).
+ +
__rmul__(self, value, /)
Return value*self.
+ +
__rpow__(self, value, mod=None, /)
Return pow(value, self, mod).
+ +
__rsub__(self, value, /)
Return value-self.
+ +
__rtruediv__(self, value, /)
Return value/self.
+ +
__sub__(self, value, /)
Return self-value.
+ +
__truediv__(self, value, /)
Return self/value.
+ +
conjugate(self, /)
Return the complex conjugate of its argument. (3-4j).conjugate() == 3+4j.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors defined here:
+
imag
+
the imaginary part of a complex number
+
+
real
+
the real part of a complex number
+
+

+ + + + + + + +
 
class dict(object)
   dict() -> new empty dictionary
+dict(mapping) -> new dictionary initialized from a mapping object's
+    (key, value) pairs
+dict(iterable) -> new dictionary initialized as if via:
+    d = {}
+    for k, v in iterable:
+        d[k] = v
+dict(**kwargs) -> new dictionary initialized with the name=value pairs
+    in the keyword argument list.  For example:  dict(one=1, two=2)
 
 Methods defined here:
+
__contains__(self, key, /)
True if the dictionary has the specified key, else False.
+ +
__delitem__(self, key, /)
Delete self[key].
+ +
__eq__(self, value, /)
Return self==value.
+ +
__ge__(self, value, /)
Return self>=value.
+ +
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__getitem__(self, key, /)
Return self[key].
+ +
__gt__(self, value, /)
Return self>value.
+ +
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__ior__(self, value, /)
Return self|=value.
+ +
__iter__(self, /)
Implement iter(self).
+ +
__le__(self, value, /)
Return self<=value.
+ +
__len__(self, /)
Return len(self).
+ +
__lt__(self, value, /)
Return self<value.
+ +
__ne__(self, value, /)
Return self!=value.
+ +
__or__(self, value, /)
Return self|value.
+ +
__repr__(self, /)
Return repr(self).
+ +
__reversed__(self, /)
Return a reverse iterator over the dict keys.
+ +
__ror__(self, value, /)
Return value|self.
+ +
__setitem__(self, key, value, /)
Set self[key] to value.
+ +
__sizeof__(self, /)
Return the size of the dict in memory, in bytes.
+ +
clear(self, /)
Remove all items from the dict.
+ +
copy(self, /)
Return a shallow copy of the dict.
+ +
get(self, key, default=None, /)
Return the value for key if key is in the dictionary, else default.
+ +
items(self, /)
Return a set-like object providing a view on the dict's items.
+ +
keys(self, /)
Return a set-like object providing a view on the dict's keys.
+ +
pop(self, key, default=<unrepresentable>, /)
D.pop(k[,d]) -> v, remove specified key and return the corresponding value.

+If the key is not found, return the default if given; otherwise,
+raise a KeyError.
+ +
popitem(self, /)
Remove and return a (key, value) pair as a 2-tuple.

+Pairs are returned in LIFO (last-in, first-out) order.
+Raises KeyError if the dict is empty.
+ +
setdefault(self, key, default=None, /)
Insert key with a value of default if key is not in the dictionary.

+Return the value for key if key is in the dictionary, else default.
+ +
update(...)
D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
+If E is present and has a .keys() method, then does:  for k in E.keys(): D[k] = E[k]
+If E is present and lacks a .keys() method, then does:  for k, v in E: D[k] = v
+In either case, this is followed by: for k in F:  D[k] = F[k]
+ +
values(self, /)
Return an object providing a view on the dict's values.
+ +
+Class methods defined here:
+
__class_getitem__(object, /)
See PEP 585
+ +
fromkeys(iterable, value=None, /)
Create a new dictionary with keys from iterable and values set to value.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data and other attributes defined here:
+
__hash__ = None
+ +

+ + + + + + + +
 
class enumerate(object)
   enumerate(iterable, start=0)

+Return an enumerate object.

+  iterable
+    an object supporting iteration

+The enumerate object yields pairs containing a count (from start, which
+defaults to zero) and a value yielded by the iterable argument.

+enumerate is useful for obtaining an indexed list:
+    (0, seq[0]), (1, seq[1]), (2, seq[2]), ...
 
 Methods defined here:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__iter__(self, /)
Implement iter(self).
+ +
__next__(self, /)
Implement next(self).
+ +
__reduce__(self, /)
Return state information for pickling.
+ +
+Class methods defined here:
+
__class_getitem__(object, /)
See PEP 585
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +

+ + + + + + + +
 
class filter(object)
   filter(function, iterable, /)

+Return an iterator yielding those items of iterable for which function(item)
+is true. If function is None, return the items that are true.
 
 Methods defined here:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__iter__(self, /)
Implement iter(self).
+ +
__next__(self, /)
Implement next(self).
+ +
__reduce__(self, /)
Return state information for pickling.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +

+ + + + + + + +
 
class float(object)
   float(x=0, /)

+Convert a string or number to a floating-point number, if possible.
 
 Methods defined here:
+
__abs__(self, /)
abs(self)
+ +
__add__(self, value, /)
Return self+value.
+ +
__bool__(self, /)
True if self else False
+ +
__ceil__(self, /)
Return the ceiling as an Integral.
+ +
__divmod__(self, value, /)
Return divmod(self, value).
+ +
__eq__(self, value, /)
Return self==value.
+ +
__float__(self, /)
float(self)
+ +
__floor__(self, /)
Return the floor as an Integral.
+ +
__floordiv__(self, value, /)
Return self//value.
+ +
__format__(self, format_spec, /)
Formats the float according to format_spec.
+ +
__ge__(self, value, /)
Return self>=value.
+ +
__getnewargs__(self, /)
+ +
__gt__(self, value, /)
Return self>value.
+ +
__hash__(self, /)
Return hash(self).
+ +
__int__(self, /)
int(self)
+ +
__le__(self, value, /)
Return self<=value.
+ +
__lt__(self, value, /)
Return self<value.
+ +
__mod__(self, value, /)
Return self%value.
+ +
__mul__(self, value, /)
Return self*value.
+ +
__ne__(self, value, /)
Return self!=value.
+ +
__neg__(self, /)
-self
+ +
__pos__(self, /)
+self
+ +
__pow__(self, value, mod=None, /)
Return pow(self, value, mod).
+ +
__radd__(self, value, /)
Return value+self.
+ +
__rdivmod__(self, value, /)
Return divmod(value, self).
+ +
__repr__(self, /)
Return repr(self).
+ +
__rfloordiv__(self, value, /)
Return value//self.
+ +
__rmod__(self, value, /)
Return value%self.
+ +
__rmul__(self, value, /)
Return value*self.
+ +
__round__(self, ndigits=None, /)
Return the Integral closest to x, rounding half toward even.

+When an argument is passed, work like built-in round(x, ndigits).
+ +
__rpow__(self, value, mod=None, /)
Return pow(value, self, mod).
+ +
__rsub__(self, value, /)
Return value-self.
+ +
__rtruediv__(self, value, /)
Return value/self.
+ +
__sub__(self, value, /)
Return self-value.
+ +
__truediv__(self, value, /)
Return self/value.
+ +
__trunc__(self, /)
Return the Integral closest to x between 0 and x.
+ +
as_integer_ratio(self, /)
Return a pair of integers, whose ratio is exactly equal to the original float.

+The ratio is in lowest terms and has a positive denominator.  Raise
+OverflowError on infinities and a ValueError on NaNs.

+>>> (10.0).as_integer_ratio()
+(10, 1)
+>>> (0.0).as_integer_ratio()
+(0, 1)
+>>> (-.25).as_integer_ratio()
+(-1, 4)
+ +
conjugate(self, /)
Return self, the complex conjugate of any float.
+ +
hex(self, /)
Return a hexadecimal representation of a floating-point number.

+>>> (-0.1).hex()
+'-0x1.999999999999ap-4'
+>>> 3.14159.hex()
+'0x1.921f9f01b866ep+1'
+ +
is_integer(self, /)
Return True if the float is an integer.
+ +
+Class methods defined here:
+
__getformat__(typestr, /)
You probably don't want to use this function.

+  typestr
+    Must be 'double' or 'float'.

+It exists mainly to be used in Python's test suite.

+This function returns whichever of 'unknown', 'IEEE, big-endian' or 'IEEE,
+little-endian' best describes the format of floating-point numbers used by the
+C type named by typestr.
+ +
fromhex(string, /)
Create a floating-point number from a hexadecimal string.

+>>> float.fromhex('0x1.ffffp10')
+2047.984375
+>>> float.fromhex('-0x1p-1074')
+-5e-324
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors defined here:
+
imag
+
the imaginary part of a complex number
+
+
real
+
the real part of a complex number
+
+

+ + + + + + + +
 
class frozenset(object)
   frozenset(iterable=(), /)

+Build an immutable unordered collection of unique elements.
 
 Methods defined here:
+
__and__(self, value, /)
Return self&value.
+ +
__contains__(self, object, /)
x.__contains__(y) <==> y in x.
+ +
__eq__(self, value, /)
Return self==value.
+ +
__ge__(self, value, /)
Return self>=value.
+ +
__gt__(self, value, /)
Return self>value.
+ +
__hash__(self, /)
Return hash(self).
+ +
__iter__(self, /)
Implement iter(self).
+ +
__le__(self, value, /)
Return self<=value.
+ +
__len__(self, /)
Return len(self).
+ +
__lt__(self, value, /)
Return self<value.
+ +
__ne__(self, value, /)
Return self!=value.
+ +
__or__(self, value, /)
Return self|value.
+ +
__rand__(self, value, /)
Return value&self.
+ +
__reduce__(self, /)
Return state information for pickling.
+ +
__repr__(self, /)
Return repr(self).
+ +
__ror__(self, value, /)
Return value|self.
+ +
__rsub__(self, value, /)
Return value-self.
+ +
__rxor__(self, value, /)
Return value^self.
+ +
__sizeof__(self, /)
S.__sizeof__() -> size of S in memory, in bytes.
+ +
__sub__(self, value, /)
Return self-value.
+ +
__xor__(self, value, /)
Return self^value.
+ +
copy(self, /)
Return a shallow copy of a set.
+ +
difference(self, /, *others)
Return a new set with elements in the set that are not in the others.
+ +
intersection(self, /, *others)
Return a new set with elements common to the set and all others.
+ +
isdisjoint(self, other, /)
Return True if two sets have a null intersection.
+ +
issubset(self, other, /)
Report whether another set contains this set.
+ +
issuperset(self, other, /)
Report whether this set contains another set.
+ +
symmetric_difference(self, other, /)
Return a new set with elements in either the set or other but not both.
+ +
union(self, /, *others)
Return a new set with elements from the set and all others.
+ +
+Class methods defined here:
+
__class_getitem__(object, /)
See PEP 585
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +

+ + + + + + + +
 
class int(object)
   int([x]) -> integer
+int(x, base=10) -> integer

+Convert a number or string to an integer, or return 0 if no arguments
+are given.  If x is a number, return x.__int__().  For floating-point
+numbers, this truncates towards zero.

+If x is not a number or if base is given, then x must be a string,
+bytes, or bytearray instance representing an integer literal in the
+given base.  The literal can be preceded by '+' or '-' and be surrounded
+by whitespace.  The base defaults to 10.  Valid bases are 0 and 2-36.
+Base 0 means to interpret the base from the string as an integer literal.
+>>> int('0b100', base=0)
+4
 
 Methods defined here:
+
__abs__(self, /)
abs(self)
+ +
__add__(self, value, /)
Return self+value.
+ +
__and__(self, value, /)
Return self&value.
+ +
__bool__(self, /)
True if self else False
+ +
__ceil__(self, /)
Ceiling of an Integral returns itself.
+ +
__divmod__(self, value, /)
Return divmod(self, value).
+ +
__eq__(self, value, /)
Return self==value.
+ +
__float__(self, /)
float(self)
+ +
__floor__(self, /)
Flooring an Integral returns itself.
+ +
__floordiv__(self, value, /)
Return self//value.
+ +
__format__(self, format_spec, /)
Convert to a string according to format_spec.
+ +
__ge__(self, value, /)
Return self>=value.
+ +
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__getnewargs__(self, /)
+ +
__gt__(self, value, /)
Return self>value.
+ +
__hash__(self, /)
Return hash(self).
+ +
__index__(self, /)
Return self converted to an integer, if self is suitable for use as an index into a list.
+ +
__int__(self, /)
int(self)
+ +
__invert__(self, /)
~self
+ +
__le__(self, value, /)
Return self<=value.
+ +
__lshift__(self, value, /)
Return self<<value.
+ +
__lt__(self, value, /)
Return self<value.
+ +
__mod__(self, value, /)
Return self%value.
+ +
__mul__(self, value, /)
Return self*value.
+ +
__ne__(self, value, /)
Return self!=value.
+ +
__neg__(self, /)
-self
+ +
__or__(self, value, /)
Return self|value.
+ +
__pos__(self, /)
+self
+ +
__pow__(self, value, mod=None, /)
Return pow(self, value, mod).
+ +
__radd__(self, value, /)
Return value+self.
+ +
__rand__(self, value, /)
Return value&self.
+ +
__rdivmod__(self, value, /)
Return divmod(value, self).
+ +
__repr__(self, /)
Return repr(self).
+ +
__rfloordiv__(self, value, /)
Return value//self.
+ +
__rlshift__(self, value, /)
Return value<<self.
+ +
__rmod__(self, value, /)
Return value%self.
+ +
__rmul__(self, value, /)
Return value*self.
+ +
__ror__(self, value, /)
Return value|self.
+ +
__round__(self, ndigits=<unrepresentable>, /)
Rounding an Integral returns itself.

+Rounding with an ndigits argument also returns an integer.
+ +
__rpow__(self, value, mod=None, /)
Return pow(value, self, mod).
+ +
__rrshift__(self, value, /)
Return value>>self.
+ +
__rshift__(self, value, /)
Return self>>value.
+ +
__rsub__(self, value, /)
Return value-self.
+ +
__rtruediv__(self, value, /)
Return value/self.
+ +
__rxor__(self, value, /)
Return value^self.
+ +
__sizeof__(self, /)
Returns size in memory, in bytes.
+ +
__sub__(self, value, /)
Return self-value.
+ +
__truediv__(self, value, /)
Return self/value.
+ +
__trunc__(self, /)
Truncating an Integral returns itself.
+ +
__xor__(self, value, /)
Return self^value.
+ +
as_integer_ratio(self, /)
Return a pair of integers, whose ratio is equal to the original int.

+The ratio is in lowest terms and has a positive denominator.

+>>> (10).as_integer_ratio()
+(10, 1)
+>>> (-10).as_integer_ratio()
+(-10, 1)
+>>> (0).as_integer_ratio()
+(0, 1)
+ +
bit_count(self, /)
Number of ones in the binary representation of the absolute value of self.

+Also known as the population count.

+>>> bin(13)
+'0b1101'
+>>> (13).bit_count()
+3
+ +
bit_length(self, /)
Number of bits necessary to represent self in binary.

+>>> bin(37)
+'0b100101'
+>>> (37).bit_length()
+6
+ +
conjugate(self, /)
Returns self, the complex conjugate of any int.
+ +
is_integer(self, /)
Returns True. Exists for duck type compatibility with float.is_integer.
+ +
to_bytes(self, /, length=1, byteorder='big', *, signed=False)
Return an array of bytes representing an integer.

+length
+  Length of bytes object to use.  An OverflowError is raised if the
+  integer is not representable with the given number of bytes.  Default
+  is length 1.
+byteorder
+  The byte order used to represent the integer.  If byteorder is 'big',
+  the most significant byte is at the beginning of the byte array.  If
+  byteorder is 'little', the most significant byte is at the end of the
+  byte array.  To request the native byte order of the host system, use
+  sys.byteorder as the byte order value.  Default is to use 'big'.
+signed
+  Determines whether two's complement is used to represent the integer.
+  If signed is False and a negative integer is given, an OverflowError
+  is raised.
+ +
+Class methods defined here:
+
from_bytes(bytes, byteorder='big', *, signed=False)
Return the integer represented by the given array of bytes.

+bytes
+  Holds the array of bytes to convert.  The argument must either
+  support the buffer protocol or be an iterable object producing bytes.
+  Bytes and bytearray are examples of built-in objects that support the
+  buffer protocol.
+byteorder
+  The byte order used to represent the integer.  If byteorder is 'big',
+  the most significant byte is at the beginning of the byte array.  If
+  byteorder is 'little', the most significant byte is at the end of the
+  byte array.  To request the native byte order of the host system, use
+  sys.byteorder as the byte order value.  Default is to use 'big'.
+signed
+  Indicates whether two's complement is used to represent the integer.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors defined here:
+
denominator
+
the denominator of a rational number in lowest terms
+
+
imag
+
the imaginary part of a complex number
+
+
numerator
+
the numerator of a rational number in lowest terms
+
+
real
+
the real part of a complex number
+
+

+ + + + + + + +
 
class list(object)
   list(iterable=(), /)

+Built-in mutable sequence.

+If no argument is given, the constructor creates a new empty list.
+The argument must be an iterable if specified.
 
 Methods defined here:
+
__add__(self, value, /)
Return self+value.
+ +
__contains__(self, key, /)
Return bool(key in self).
+ +
__delitem__(self, key, /)
Delete self[key].
+ +
__eq__(self, value, /)
Return self==value.
+ +
__ge__(self, value, /)
Return self>=value.
+ +
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__getitem__(self, index, /)
Return self[index].
+ +
__gt__(self, value, /)
Return self>value.
+ +
__iadd__(self, value, /)
Implement self+=value.
+ +
__imul__(self, value, /)
Implement self*=value.
+ +
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__iter__(self, /)
Implement iter(self).
+ +
__le__(self, value, /)
Return self<=value.
+ +
__len__(self, /)
Return len(self).
+ +
__lt__(self, value, /)
Return self<value.
+ +
__mul__(self, value, /)
Return self*value.
+ +
__ne__(self, value, /)
Return self!=value.
+ +
__repr__(self, /)
Return repr(self).
+ +
__reversed__(self, /)
Return a reverse iterator over the list.
+ +
__rmul__(self, value, /)
Return value*self.
+ +
__setitem__(self, key, value, /)
Set self[key] to value.
+ +
__sizeof__(self, /)
Return the size of the list in memory, in bytes.
+ +
append(self, object, /)
Append object to the end of the list.
+ +
clear(self, /)
Remove all items from list.
+ +
copy(self, /)
Return a shallow copy of the list.
+ +
count(self, value, /)
Return number of occurrences of value.
+ +
extend(self, iterable, /)
Extend list by appending elements from the iterable.
+ +
index(self, value, start=0, stop=9223372036854775807, /)
Return first index of value.

+Raises ValueError if the value is not present.
+ +
insert(self, index, object, /)
Insert object before index.
+ +
pop(self, index=-1, /)
Remove and return item at index (default last).

+Raises IndexError if list is empty or index is out of range.
+ +
remove(self, value, /)
Remove first occurrence of value.

+Raises ValueError if the value is not present.
+ +
reverse(self, /)
Reverse *IN PLACE*.
+ +
sort(self, /, *, key=None, reverse=False)
Sort the list in ascending order and return None.

+The sort is in-place (i.e. the list itself is modified) and stable (i.e. the
+order of two equal elements is maintained).

+If a key function is given, apply it once to each list item and sort them,
+ascending or descending, according to their function values.

+The reverse flag can be set to sort in descending order.
+ +
+Class methods defined here:
+
__class_getitem__(object, /)
See PEP 585
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data and other attributes defined here:
+
__hash__ = None
+ +

+ + + + + + + +
 
class map(object)
   map(function, iterable, /, *iterables)

+Make an iterator that computes the function using arguments from
+each of the iterables.  Stops when the shortest iterable is exhausted.
 
 Methods defined here:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__iter__(self, /)
Implement iter(self).
+ +
__next__(self, /)
Implement next(self).
+ +
__reduce__(self, /)
Return state information for pickling.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +

+ + + + + + + +
 
class memoryview(object)
   memoryview(object)

+Create a new memoryview object which references the given object.
 
 Methods defined here:
+
__buffer__(self, flags, /)
Return a buffer object that exposes the underlying memory of the object.
+ +
__delitem__(self, key, /)
Delete self[key].
+ +
__enter__(self, /)
+ +
__eq__(self, value, /)
Return self==value.
+ +
__exit__(self, /, *exc_info)
Release the underlying buffer exposed by the memoryview object.
+ +
__ge__(self, value, /)
Return self>=value.
+ +
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__getitem__(self, key, /)
Return self[key].
+ +
__gt__(self, value, /)
Return self>value.
+ +
__hash__(self, /)
Return hash(self).
+ +
__iter__(self, /)
Implement iter(self).
+ +
__le__(self, value, /)
Return self<=value.
+ +
__len__(self, /)
Return len(self).
+ +
__lt__(self, value, /)
Return self<value.
+ +
__ne__(self, value, /)
Return self!=value.
+ +
__release_buffer__(self, buffer, /)
Release the buffer object that exposes the underlying memory of the object.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setitem__(self, key, value, /)
Set self[key] to value.
+ +
cast(self, /, format, shape=<unrepresentable>)
Cast a memoryview to a new format or shape.
+ +
hex(self, /, sep=<unrepresentable>, bytes_per_sep=1)
Return the data in the buffer as a str of hexadecimal numbers.

+  sep
+    An optional single character or byte to separate hex bytes.
+  bytes_per_sep
+    How many bytes between separators.  Positive values count from the
+    right, negative values count from the left.

+Example:
+>>> value = memoryview(b'\xb9\x01\xef')
+>>> value.hex()
+'b901ef'
+>>> value.hex(':')
+'b9:01:ef'
+>>> value.hex(':', 2)
+'b9:01ef'
+>>> value.hex(':', -2)
+'b901:ef'
+ +
release(self, /)
Release the underlying buffer exposed by the memoryview object.
+ +
tobytes(self, /, order='C')
Return the data in the buffer as a byte string.

+Order can be {'C', 'F', 'A'}. When order is 'C' or 'F', the data of the
+original array is converted to C or Fortran order. For contiguous views,
+'A' returns an exact copy of the physical memory. In particular, in-memory
+Fortran order is preserved. For non-contiguous views, the data is converted
+to C first. order=None is the same as order='C'.
+ +
tolist(self, /)
Return the data in the buffer as a list of elements.
+ +
toreadonly(self, /)
Return a readonly version of the memoryview.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors defined here:
+
c_contiguous
+
A bool indicating whether the memory is C contiguous.
+
+
contiguous
+
A bool indicating whether the memory is contiguous.
+
+
f_contiguous
+
A bool indicating whether the memory is Fortran contiguous.
+
+
format
+
A string containing the format (in struct module style)
+for each element in the view.
+
+
itemsize
+
The size in bytes of each element of the memoryview.
+
+
nbytes
+
The amount of space in bytes that the array would use in
+a contiguous representation.
+
+
ndim
+
An integer indicating how many dimensions of a multi-dimensional
+array the memory represents.
+
+
obj
+
The underlying object of the memoryview.
+
+
readonly
+
A bool indicating whether the memory is read only.
+
+
shape
+
A tuple of ndim integers giving the shape of the memory
+as an N-dimensional array.
+
+
strides
+
A tuple of ndim integers giving the size in bytes to access
+each element for each dimension of the array.
+
+
suboffsets
+
A tuple of integers used internally for PIL-style arrays.
+
+

+ + + + + + + +
 
class object
   The base class of the class hierarchy.

+When called, it accepts no arguments and returns a new featureless
+instance that has no instance attributes and cannot be given any.
 
 Methods defined here:
+
__delattr__(self, name, /)
Implement delattr(self, name).
+ +
__dir__(self, /)
Default dir() implementation.
+ +
__eq__(self, value, /)
Return self==value.
+ +
__format__(self, format_spec, /)
Default object formatter.

+Return str(self) if format_spec is empty. Raise TypeError otherwise.
+ +
__ge__(self, value, /)
Return self>=value.
+ +
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__getstate__(self, /)
Helper for pickle.
+ +
__gt__(self, value, /)
Return self>value.
+ +
__hash__(self, /)
Return hash(self).
+ +
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__le__(self, value, /)
Return self<=value.
+ +
__lt__(self, value, /)
Return self<value.
+ +
__ne__(self, value, /)
Return self!=value.
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__reduce_ex__(self, protocol, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__setattr__(self, name, value, /)
Implement setattr(self, name, value).
+ +
__sizeof__(self, /)
Size of object in memory, in bytes.
+ +
__str__(self, /)
Return str(self).
+ +
+Class methods defined here:
+
__init_subclass__()
This method is called when a class is subclassed.

+The default implementation does nothing. It may be
+overridden to extend subclasses.
+ +
__subclasshook__(object, /)
Abstract classes can override this to customize issubclass().

+This is invoked early on by abc.ABCMeta.__subclasscheck__().
+It should return True, False or NotImplemented.  If it returns
+NotImplemented, the normal algorithm is used.  Otherwise, it
+overrides the normal algorithm (and the outcome is cached).
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data and other attributes defined here:
+
__class__ = <class 'type'>
type(object) -> the object's type
+type(name, bases, dict, **kwds) -> a new type
+ +

+ + + + + + + +
 
class property(object)
   property(fget=None, fset=None, fdel=None, doc=None)

+Property attribute.

+  fget
+    function to be used for getting an attribute value
+  fset
+    function to be used for setting an attribute value
+  fdel
+    function to be used for del'ing an attribute
+  doc
+    docstring

+Typical use is to define a managed attribute x:

+class C(object):
+    def getx(self): return self._x
+    def setx(self, value): self._x = value
+    def delx(self): del self._x
+    x = property(getx, setx, delx, "I'm the 'x' property.")

+Decorators make defining new properties or modifying existing ones easy:

+class C(object):
+    @property
+    def x(self):
+        "I am the 'x' property."
+        return self._x
+    @x.setter
+    def x(self, value):
+        self._x = value
+    @x.deleter
+    def x(self):
+        del self._x
 
 Methods defined here:
+
__delete__(self, instance, /)
Delete an attribute of instance.
+ +
__get__(self, instance, owner=None, /)
Return an attribute of instance, which is of type owner.
+ +
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__set__(self, instance, value, /)
Set an attribute of instance to value.
+ +
__set_name__(self, owner, name, /)
Method to set name of a property.
+ +
deleter(self, object, /)
Descriptor to obtain a copy of the property with a different deleter.
+ +
getter(self, object, /)
Descriptor to obtain a copy of the property with a different getter.
+ +
setter(self, object, /)
Descriptor to obtain a copy of the property with a different setter.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors defined here:
+
__isabstractmethod__
+
+
fdel
+
+
fget
+
+
fset
+
+

+ + + + + + + +
 
class range(object)
   range(stop) -> range object
+range(start, stop[, step]) -> range object

+Return an object that produces a sequence of integers from start (inclusive)
+to stop (exclusive) by step.  range(i, j) produces i, i+1, i+2, ..., j-1.
+start defaults to 0, and stop is omitted!  range(4) produces 0, 1, 2, 3.
+These are exactly the valid indices for a list of 4 elements.
+When step is given, it specifies the increment (or decrement).
 
 Methods defined here:
+
__bool__(self, /)
True if self else False
+ +
__contains__(self, key, /)
Return bool(key in self).
+ +
__eq__(self, value, /)
Return self==value.
+ +
__ge__(self, value, /)
Return self>=value.
+ +
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__getitem__(self, key, /)
Return self[key].
+ +
__gt__(self, value, /)
Return self>value.
+ +
__hash__(self, /)
Return hash(self).
+ +
__iter__(self, /)
Implement iter(self).
+ +
__le__(self, value, /)
Return self<=value.
+ +
__len__(self, /)
Return len(self).
+ +
__lt__(self, value, /)
Return self<value.
+ +
__ne__(self, value, /)
Return self!=value.
+ +
__reduce__(self, /)
Helper for pickle.
+ +
__repr__(self, /)
Return repr(self).
+ +
__reversed__(self, /)
Return a reverse iterator.
+ +
count(self, object, /)
rangeobject.count(value) -> integer -- return number of occurrences of value
+ +
index(self, object, /)
rangeobject.index(value) -> integer -- return index of value.
+Raise ValueError if the value is not present.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors defined here:
+
start
+
+
step
+
+
stop
+
+

+ + + + + + + +
 
class reversed(object)
   reversed(sequence, /)

+Return a reverse iterator over the values of the given sequence.
 
 Methods defined here:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__iter__(self, /)
Implement iter(self).
+ +
__length_hint__(self, /)
Private method returning an estimate of len(list(it)).
+ +
__next__(self, /)
Implement next(self).
+ +
__reduce__(self, /)
Return state information for pickling.
+ +
__setstate__(self, object, /)
Set state information for unpickling.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +

+ + + + + + + +
 
class set(object)
   set(iterable=(), /)

+Build an unordered collection of unique elements.
 
 Methods defined here:
+
__and__(self, value, /)
Return self&value.
+ +
__contains__(self, object, /)
x.__contains__(y) <==> y in x.
+ +
__eq__(self, value, /)
Return self==value.
+ +
__ge__(self, value, /)
Return self>=value.
+ +
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__gt__(self, value, /)
Return self>value.
+ +
__iand__(self, value, /)
Return self&=value.
+ +
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__ior__(self, value, /)
Return self|=value.
+ +
__isub__(self, value, /)
Return self-=value.
+ +
__iter__(self, /)
Implement iter(self).
+ +
__ixor__(self, value, /)
Return self^=value.
+ +
__le__(self, value, /)
Return self<=value.
+ +
__len__(self, /)
Return len(self).
+ +
__lt__(self, value, /)
Return self<value.
+ +
__ne__(self, value, /)
Return self!=value.
+ +
__or__(self, value, /)
Return self|value.
+ +
__rand__(self, value, /)
Return value&self.
+ +
__reduce__(self, /)
Return state information for pickling.
+ +
__repr__(self, /)
Return repr(self).
+ +
__ror__(self, value, /)
Return value|self.
+ +
__rsub__(self, value, /)
Return value-self.
+ +
__rxor__(self, value, /)
Return value^self.
+ +
__sizeof__(self, /)
S.__sizeof__() -> size of S in memory, in bytes.
+ +
__sub__(self, value, /)
Return self-value.
+ +
__xor__(self, value, /)
Return self^value.
+ +
add(self, object, /)
Add an element to a set.

+This has no effect if the element is already present.
+ +
clear(self, /)
Remove all elements from this set.
+ +
copy(self, /)
Return a shallow copy of a set.
+ +
difference(self, /, *others)
Return a new set with elements in the set that are not in the others.
+ +
difference_update(self, /, *others)
Update the set, removing elements found in others.
+ +
discard(self, object, /)
Remove an element from a set if it is a member.

+Unlike set.remove(), the discard() method does not raise
+an exception when an element is missing from the set.
+ +
intersection(self, /, *others)
Return a new set with elements common to the set and all others.
+ +
intersection_update(self, /, *others)
Update the set, keeping only elements found in it and all others.
+ +
isdisjoint(self, other, /)
Return True if two sets have a null intersection.
+ +
issubset(self, other, /)
Report whether another set contains this set.
+ +
issuperset(self, other, /)
Report whether this set contains another set.
+ +
pop(self, /)
Remove and return an arbitrary set element.

+Raises KeyError if the set is empty.
+ +
remove(self, object, /)
Remove an element from a set; it must be a member.

+If the element is not a member, raise a KeyError.
+ +
symmetric_difference(self, other, /)
Return a new set with elements in either the set or other but not both.
+ +
symmetric_difference_update(self, other, /)
Update the set, keeping only elements found in either set, but not in both.
+ +
union(self, /, *others)
Return a new set with elements from the set and all others.
+ +
update(self, /, *others)
Update the set, adding elements from all others.
+ +
+Class methods defined here:
+
__class_getitem__(object, /)
See PEP 585
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data and other attributes defined here:
+
__hash__ = None
+ +

+ + + + + + + +
 
class slice(object)
   slice(stop)
+slice(start, stop[, step])

+Create a slice object.  This is used for extended slicing (e.g. a[0:10:2]).
 
 Methods defined here:
+
__eq__(self, value, /)
Return self==value.
+ +
__ge__(self, value, /)
Return self>=value.
+ +
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__gt__(self, value, /)
Return self>value.
+ +
__hash__(self, /)
Return hash(self).
+ +
__le__(self, value, /)
Return self<=value.
+ +
__lt__(self, value, /)
Return self<value.
+ +
__ne__(self, value, /)
Return self!=value.
+ +
__reduce__(self, /)
Return state information for pickling.
+ +
__repr__(self, /)
Return repr(self).
+ +
indices(self, object, /)
S.indices(len) -> (start, stop, stride)

+Assuming a sequence of length len, calculate the start and stop
+indices, and the stride length of the extended slice described by
+S. Out of bounds indices are clipped in a manner consistent with the
+handling of normal slices.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors defined here:
+
start
+
+
step
+
+
stop
+
+

+ + + + + + + +
 
class staticmethod(object)
   staticmethod(function, /)

+Convert a function to be a static method.

+A static method does not receive an implicit first argument.
+To declare a static method, use this idiom:

+     class C:
+         @staticmethod
+         def f(arg1, arg2, argN):
+             ...

+It can be called either on the class (e.g. C.f()) or on an instance
+(e.g. C().f()). Both the class and the instance are ignored, and
+neither is passed implicitly as the first argument to the method.

+Static methods in Python are similar to those found in Java or C++.
+For a more advanced concept, see the classmethod builtin.
 
 Methods defined here:
+
__call__(self, /, *args, **kwargs)
Call self as a function.
+ +
__get__(self, instance, owner=None, /)
Return an attribute of instance, which is of type owner.
+ +
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__repr__(self, /)
Return repr(self).
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors defined here:
+
__dict__
+
+
__func__
+
+
__isabstractmethod__
+
+
__wrapped__
+
+

+ + + + + + + +
 
class str(object)
   str(object='') -> str
+str(bytes_or_buffer[, encoding[, errors]]) -> str

+Create a new string object from the given object. If encoding or
+errors is specified, then the object must expose a data buffer
+that will be decoded using the given encoding and error handler.
+Otherwise, returns the result of object.__str__() (if defined)
+or repr(object).
+encoding defaults to 'utf-8'.
+errors defaults to 'strict'.
 
 Methods defined here:
+
__add__(self, value, /)
Return self+value.
+ +
__contains__(self, key, /)
Return bool(key in self).
+ +
__eq__(self, value, /)
Return self==value.
+ +
__format__(self, format_spec, /)
Return a formatted version of the string as described by format_spec.
+ +
__ge__(self, value, /)
Return self>=value.
+ +
__getitem__(self, key, /)
Return self[key].
+ +
__getnewargs__(self, /)
+ +
__gt__(self, value, /)
Return self>value.
+ +
__hash__(self, /)
Return hash(self).
+ +
__iter__(self, /)
Implement iter(self).
+ +
__le__(self, value, /)
Return self<=value.
+ +
__len__(self, /)
Return len(self).
+ +
__lt__(self, value, /)
Return self<value.
+ +
__mod__(self, value, /)
Return self%value.
+ +
__mul__(self, value, /)
Return self*value.
+ +
__ne__(self, value, /)
Return self!=value.
+ +
__repr__(self, /)
Return repr(self).
+ +
__rmod__(self, value, /)
Return value%self.
+ +
__rmul__(self, value, /)
Return value*self.
+ +
__sizeof__(self, /)
Return the size of the string in memory, in bytes.
+ +
__str__(self, /)
Return str(self).
+ +
capitalize(self, /)
Return a capitalized version of the string.

+More specifically, make the first character have upper case and the rest lower
+case.
+ +
casefold(self, /)
Return a version of the string suitable for caseless comparisons.
+ +
center(self, width, fillchar=' ', /)
Return a centered string of length width.

+Padding is done using the specified fill character (default is a space).
+ +
count(self, sub[, start[, end]], /)
Return the number of non-overlapping occurrences of substring sub in string S[start:end].

+Optional arguments start and end are interpreted as in slice notation.
+ +
encode(self, /, encoding='utf-8', errors='strict')
Encode the string using the codec registered for encoding.

+encoding
+  The encoding in which to encode the string.
+errors
+  The error handling scheme to use for encoding errors.
+  The default is 'strict' meaning that encoding errors raise a
+  UnicodeEncodeError.  Other possible values are 'ignore', 'replace' and
+  'xmlcharrefreplace' as well as any other name registered with
+  codecs.register_error that can handle UnicodeEncodeErrors.
+ +
endswith(self, suffix[, start[, end]], /)
Return True if the string ends with the specified suffix, False otherwise.

+suffix
+  A string or a tuple of strings to try.
+start
+  Optional start position. Default: start of the string.
+end
+  Optional stop position. Default: end of the string.
+ +
expandtabs(self, /, tabsize=8)
Return a copy where all tab characters are expanded using spaces.

+If tabsize is not given, a tab size of 8 characters is assumed.
+ +
find(self, sub[, start[, end]], /)
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].

+Optional arguments start and end are interpreted as in slice notation.
+Return -1 on failure.
+ +
format(self, /, *args, **kwargs)
Return a formatted version of the string, using substitutions from args and kwargs.
+The substitutions are identified by braces ('{' and '}').
+ +
format_map(self, mapping, /)
Return a formatted version of the string, using substitutions from mapping.
+The substitutions are identified by braces ('{' and '}').
+ +
index(self, sub[, start[, end]], /)
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].

+Optional arguments start and end are interpreted as in slice notation.
+Raises ValueError when the substring is not found.
+ +
isalnum(self, /)
Return True if the string is an alpha-numeric string, False otherwise.

+A string is alpha-numeric if all characters in the string are alpha-numeric and
+there is at least one character in the string.
+ +
isalpha(self, /)
Return True if the string is an alphabetic string, False otherwise.

+A string is alphabetic if all characters in the string are alphabetic and there
+is at least one character in the string.
+ +
isascii(self, /)
Return True if all characters in the string are ASCII, False otherwise.

+ASCII characters have code points in the range U+0000-U+007F.
+Empty string is ASCII too.
+ +
isdecimal(self, /)
Return True if the string is a decimal string, False otherwise.

+A string is a decimal string if all characters in the string are decimal and
+there is at least one character in the string.
+ +
isdigit(self, /)
Return True if the string is a digit string, False otherwise.

+A string is a digit string if all characters in the string are digits and there
+is at least one character in the string.
+ +
isidentifier(self, /)
Return True if the string is a valid Python identifier, False otherwise.

+Call keyword.iskeyword(s) to test whether string s is a reserved identifier,
+such as "def" or "class".
+ +
islower(self, /)
Return True if the string is a lowercase string, False otherwise.

+A string is lowercase if all cased characters in the string are lowercase and
+there is at least one cased character in the string.
+ +
isnumeric(self, /)
Return True if the string is a numeric string, False otherwise.

+A string is numeric if all characters in the string are numeric and there is at
+least one character in the string.
+ +
isprintable(self, /)
Return True if all characters in the string are printable, False otherwise.

+A character is printable if repr() may use it in its output.
+ +
isspace(self, /)
Return True if the string is a whitespace string, False otherwise.

+A string is whitespace if all characters in the string are whitespace and there
+is at least one character in the string.
+ +
istitle(self, /)
Return True if the string is a title-cased string, False otherwise.

+In a title-cased string, upper- and title-case characters may only
+follow uncased characters and lowercase characters only cased ones.
+ +
isupper(self, /)
Return True if the string is an uppercase string, False otherwise.

+A string is uppercase if all cased characters in the string are uppercase and
+there is at least one cased character in the string.
+ +
join(self, iterable, /)
Concatenate any number of strings.

+The string whose method is called is inserted in between each given string.
+The result is returned as a new string.

+Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
+ +
ljust(self, width, fillchar=' ', /)
Return a left-justified string of length width.

+Padding is done using the specified fill character (default is a space).
+ +
lower(self, /)
Return a copy of the string converted to lowercase.
+ +
lstrip(self, chars=None, /)
Return a copy of the string with leading whitespace removed.

+If chars is given and not None, remove characters in chars instead.
+ +
partition(self, sep, /)
Partition the string into three parts using the given separator.

+This will search for the separator in the string.  If the separator is found,
+returns a 3-tuple containing the part before the separator, the separator
+itself, and the part after it.

+If the separator is not found, returns a 3-tuple containing the original string
+and two empty strings.
+ +
removeprefix(self, prefix, /)
Return a str with the given prefix string removed if present.

+If the string starts with the prefix string, return string[len(prefix):].
+Otherwise, return a copy of the original string.
+ +
removesuffix(self, suffix, /)
Return a str with the given suffix string removed if present.

+If the string ends with the suffix string and that suffix is not empty,
+return string[:-len(suffix)]. Otherwise, return a copy of the original
+string.
+ +
replace(self, old, new, /, count=-1)
Return a copy with all occurrences of substring old replaced by new.

+  count
+    Maximum number of occurrences to replace.
+    -1 (the default value) means replace all occurrences.

+If the optional argument count is given, only the first count occurrences are
+replaced.
+ +
rfind(self, sub[, start[, end]], /)
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].

+Optional arguments start and end are interpreted as in slice notation.
+Return -1 on failure.
+ +
rindex(self, sub[, start[, end]], /)
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].

+Optional arguments start and end are interpreted as in slice notation.
+Raises ValueError when the substring is not found.
+ +
rjust(self, width, fillchar=' ', /)
Return a right-justified string of length width.

+Padding is done using the specified fill character (default is a space).
+ +
rpartition(self, sep, /)
Partition the string into three parts using the given separator.

+This will search for the separator in the string, starting at the end. If
+the separator is found, returns a 3-tuple containing the part before the
+separator, the separator itself, and the part after it.

+If the separator is not found, returns a 3-tuple containing two empty strings
+and the original string.
+ +
rsplit(self, /, sep=None, maxsplit=-1)
Return a list of the substrings in the string, using sep as the separator string.

+  sep
+    The separator used to split the string.

+    When set to None (the default value), will split on any whitespace
+    character (including \n \r \t \f and spaces) and will discard
+    empty strings from the result.
+  maxsplit
+    Maximum number of splits.
+    -1 (the default value) means no limit.

+Splitting starts at the end of the string and works to the front.
+ +
rstrip(self, chars=None, /)
Return a copy of the string with trailing whitespace removed.

+If chars is given and not None, remove characters in chars instead.
+ +
split(self, /, sep=None, maxsplit=-1)
Return a list of the substrings in the string, using sep as the separator string.

+  sep
+    The separator used to split the string.

+    When set to None (the default value), will split on any whitespace
+    character (including \n \r \t \f and spaces) and will discard
+    empty strings from the result.
+  maxsplit
+    Maximum number of splits.
+    -1 (the default value) means no limit.

+Splitting starts at the front of the string and works to the end.

+Note, str.split() is mainly useful for data that has been intentionally
+delimited.  With natural text that includes punctuation, consider using
+the regular expression module.
+ +
splitlines(self, /, keepends=False)
Return a list of the lines in the string, breaking at line boundaries.

+Line breaks are not included in the resulting list unless keepends is given and
+true.
+ +
startswith(self, prefix[, start[, end]], /)
Return True if the string starts with the specified prefix, False otherwise.

+prefix
+  A string or a tuple of strings to try.
+start
+  Optional start position. Default: start of the string.
+end
+  Optional stop position. Default: end of the string.
+ +
strip(self, chars=None, /)
Return a copy of the string with leading and trailing whitespace removed.

+If chars is given and not None, remove characters in chars instead.
+ +
swapcase(self, /)
Convert uppercase characters to lowercase and lowercase characters to uppercase.
+ +
title(self, /)
Return a version of the string where each word is titlecased.

+More specifically, words start with uppercased characters and all remaining
+cased characters have lower case.
+ +
translate(self, table, /)
Replace each character in the string using the given translation table.

+  table
+    Translation table, which must be a mapping of Unicode ordinals to
+    Unicode ordinals, strings, or None.

+The table must implement lookup/indexing via __getitem__, for instance a
+dictionary or list.  If this operation raises LookupError, the character is
+left untouched.  Characters mapped to None are deleted.
+ +
upper(self, /)
Return a copy of the string converted to uppercase.
+ +
zfill(self, width, /)
Pad a numeric string with zeros on the left, to fill a field of the given width.

+The string is never truncated.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
maketrans(x, y=<unrepresentable>, z=<unrepresentable>, /)
Return a translation table usable for str.translate().

+If there is only one argument, it must be a dictionary mapping Unicode
+ordinals (integers) or characters to Unicode ordinals, strings or None.
+Character keys will be then converted to ordinals.
+If there are two arguments, they must be strings of equal length, and
+in the resulting dictionary, each character in x will be mapped to the
+character at the same position in y. If there is a third argument, it
+must be a string, whose characters will be mapped to None in the result.
+ +

+ + + + + + + +
 
class super(object)
   super() -> same as super(__class__, <first argument>)
+super(type) -> unbound super object
+super(type, obj) -> bound super object; requires isinstance(obj, type)
+super(type, type2) -> bound super object; requires issubclass(type2, type)
+Typical use to call a cooperative superclass method:
+class C(B):
+    def meth(self, arg):
+        super().meth(arg)
+This works for class methods too:
+class C(B):
+    @classmethod
+    def cmeth(cls, arg):
+        super().cmeth(arg)
 
 Methods defined here:
+
__get__(self, instance, owner=None, /)
Return an attribute of instance, which is of type owner.
+ +
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__repr__(self, /)
Return repr(self).
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors defined here:
+
__self__
+
the instance invoking super(); may be None
+
+
__self_class__
+
the type of the instance invoking super(); may be None
+
+
__thisclass__
+
the class invoking super()
+
+

+ + + + + + + +
 
class tuple(object)
   tuple(iterable=(), /)

+Built-in immutable sequence.

+If no argument is given, the constructor returns an empty tuple.
+If iterable is specified the tuple is initialized from iterable's items.

+If the argument is a tuple, the return value is the same object.
 
 Methods defined here:
+
__add__(self, value, /)
Return self+value.
+ +
__contains__(self, key, /)
Return bool(key in self).
+ +
__eq__(self, value, /)
Return self==value.
+ +
__ge__(self, value, /)
Return self>=value.
+ +
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__getitem__(self, key, /)
Return self[key].
+ +
__getnewargs__(self, /)
+ +
__gt__(self, value, /)
Return self>value.
+ +
__hash__(self, /)
Return hash(self).
+ +
__iter__(self, /)
Implement iter(self).
+ +
__le__(self, value, /)
Return self<=value.
+ +
__len__(self, /)
Return len(self).
+ +
__lt__(self, value, /)
Return self<value.
+ +
__mul__(self, value, /)
Return self*value.
+ +
__ne__(self, value, /)
Return self!=value.
+ +
__repr__(self, /)
Return repr(self).
+ +
__rmul__(self, value, /)
Return value*self.
+ +
count(self, value, /)
Return number of occurrences of value.
+ +
index(self, value, start=0, stop=9223372036854775807, /)
Return first index of value.

+Raises ValueError if the value is not present.
+ +
+Class methods defined here:
+
__class_getitem__(object, /)
See PEP 585
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +

+ + + + + + + +
 
class type(object)
   type(object) -> the object's type
+type(name, bases, dict, **kwds) -> a new type
 
 Methods defined here:
+
__call__(self, /, *args, **kwargs)
Call self as a function.
+ +
__delattr__(self, name, /)
Implement delattr(self, name).
+ +
__dir__(self, /)
Specialized __dir__ implementation for types.
+ +
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
__instancecheck__(self, instance, /)
Check if an object is an instance.
+ +
__or__(self, value, /)
Return self|value.
+ +
__repr__(self, /)
Return repr(self).
+ +
__ror__(self, value, /)
Return value|self.
+ +
__setattr__(self, name, value, /)
Implement setattr(self, name, value).
+ +
__sizeof__(self, /)
Return memory consumption of the type object.
+ +
__subclasscheck__(self, subclass, /)
Check if a class is a subclass.
+ +
__subclasses__(self, /)
Return a list of immediate subclasses.
+ +
mro(self, /)
Return a type's method resolution order.
+ +
+Class methods defined here:
+
__prepare__(name, bases, /, **kwds)
Create the namespace for the class statement
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +
+Data descriptors defined here:
+
__abstractmethods__
+
+
__annotations__
+
+
__dict__
+
+
__text_signature__
+
+
+Data and other attributes defined here:
+
__base__ = <class 'object'>
The base class of the class hierarchy.

+When called, it accepts no arguments and returns a new featureless
+instance that has no instance attributes and cannot be given any.
+ +
__bases__ = (<class 'object'>,)
+ +
__basicsize__ = 928
+ +
__dictoffset__ = 264
+ +
__flags__ = 2155896066
+ +
__itemsize__ = 40
+ +
__mro__ = (<class 'type'>, <class 'object'>)
+ +
__type_params__ = ()
+ +
__weakrefoffset__ = 368
+ +

+ + + + + + + +
 
class zip(object)
   zip(*iterables, strict=False)

+The zip object yields n-length tuples, where n is the number of iterables
+passed as positional arguments to zip().  The i-th element in every tuple
+comes from the i-th iterable argument to zip().  This continues until the
+shortest argument is exhausted.

+If strict is true and one of the arguments is exhausted before the others,
+raise a ValueError.

+   >>> list(zip('abcdefg', range(3), range(4)))
+   [('a', 0, 0), ('b', 1, 1), ('c', 2, 2)]
 
 Methods defined here:
+
__getattribute__(self, name, /)
Return getattr(self, name).
+ +
__iter__(self, /)
Implement iter(self).
+ +
__next__(self, /)
Implement next(self).
+ +
__reduce__(self, /)
Return state information for pickling.
+ +
__setstate__(self, object, /)
Set state information for unpickling.
+ +
+Static methods defined here:
+
__new__(*args, **kwargs)
Create and return a new object.  See help(type) for accurate signature.
+ +

+ + + + + +
 
Functions
       
__build_class__(...)
__build_class__(func, name, /, *bases, [metaclass], **kwds) -> class

+Internal helper function used by the class statement.
+
__import__(name, globals=None, locals=None, fromlist=(), level=0)
Import a module.

+Because this function is meant for use by the Python
+interpreter and not for general use, it is better to use
+importlib.import_module() to programmatically import a module.

+The globals argument is only used to determine the context;
+they are not modified.  The locals argument is unused.  The fromlist
+should be a list of names to emulate ``from name import ...``, or an
+empty list to emulate ``import name``.
+When importing a module from a package, note that __import__('A.B', ...)
+returns package A when fromlist is empty, but its submodule B when
+fromlist is not empty.  The level argument is used to determine whether to
+perform absolute or relative imports: 0 is absolute, while a positive number
+is the number of parent directories to search relative to the current module.
+
abs(x, /)
Return the absolute value of the argument.
+
aiter(async_iterable, /)
Return an AsyncIterator for an AsyncIterable object.
+
all(iterable, /)
Return True if bool(x) is True for all values x in the iterable.

+If the iterable is empty, return True.
+
anext(aiterator, default=<unrepresentable>, /)
Return the next item from the async iterator.

+If default is given and the async iterator is exhausted,
+it is returned instead of raising StopAsyncIteration.
+
any(iterable, /)
Return True if bool(x) is True for any x in the iterable.

+If the iterable is empty, return False.
+
ascii(obj, /)
Return an ASCII-only representation of an object.

+As repr(), return a string containing a printable representation of an
+object, but escape the non-ASCII characters in the string returned by
+repr() using \\x, \\u or \\U escapes. This generates a string similar
+to that returned by repr() in Python 2.
+
bin(number, /)
Return the binary representation of an integer.

+>>> bin(2796202)
+'0b1010101010101010101010'
+
breakpoint(*args, **kws)
Call sys.breakpointhook(*args, **kws).  sys.breakpointhook() must accept
+whatever arguments are passed.

+By default, this drops you into the pdb debugger.
+
callable(obj, /)
Return whether the object is callable (i.e., some kind of function).

+Note that classes are callable, as are instances of classes with a
+__call__() method.
+
chr(i, /)
Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff.
+
compile( + source, + filename, + mode, + flags=0, + dont_inherit=False, + optimize=-1, + *, + _feature_version=-1 +)
Compile source into a code object that can be executed by exec() or eval().

+The source code may represent a Python module, statement or expression.
+The filename will be used for run-time error messages.
+The mode must be 'exec' to compile a module, 'single' to compile a
+single (interactive) statement, or 'eval' to compile an expression.
+The flags argument, if present, controls which future statements influence
+the compilation of the code.
+The dont_inherit argument, if true, stops the compilation inheriting
+the effects of any future statements in effect in the code calling
+compile; if absent or false these statements do influence the compilation,
+in addition to any features explicitly specified.
+
delattr(obj, name, /)
Deletes the named attribute from the given object.

+delattr(x, 'y') is equivalent to ``del x.y``
+
dir(...)
dir([object]) -> list of strings

+If called without an argument, return the names in the current scope.
+Else, return an alphabetized list of names comprising (some of) the attributes
+of the given object, and of attributes reachable from it.
+If the object supplies a method named __dir__, it will be used; otherwise
+the default dir() logic is used and returns:
+  for a module object: the module's attributes.
+  for a class object:  its attributes, and recursively the attributes
+    of its bases.
+  for any other object: its attributes, its class's attributes, and
+    recursively the attributes of its class's base classes.
+
divmod(x, y, /)
Return the tuple (x//y, x%y).  Invariant: div*y + mod == x.
+
eval(source, /, globals=None, locals=None)
Evaluate the given source in the context of globals and locals.

+The source may be a string representing a Python expression
+or a code object as returned by compile().
+The globals must be a dictionary and locals can be any mapping,
+defaulting to the current globals and locals.
+If only globals is given, locals defaults to it.
+
exec(source, /, globals=None, locals=None, *, closure=None)
Execute the given source in the context of globals and locals.

+The source may be a string representing one or more Python statements
+or a code object as returned by compile().
+The globals must be a dictionary and locals can be any mapping,
+defaulting to the current globals and locals.
+If only globals is given, locals defaults to it.
+The closure must be a tuple of cellvars, and can only be used
+when source is a code object requiring exactly that many cellvars.
+
format(value, format_spec='', /)
Return type(value).__format__(value, format_spec)

+Many built-in types implement format_spec according to the
+Format Specification Mini-language. See help('FORMATTING').

+If type(value) does not supply a method named __format__
+and format_spec is empty, then str(value) is returned.
+See also help('SPECIALMETHODS').
+
getattr(...)
getattr(object, name[, default]) -> value

+Get a named attribute from an objectgetattr(x, 'y') is equivalent to x.y.
+When a default argument is given, it is returned when the attribute doesn't
+exist; without it, an exception is raised in that case.
+
globals()
Return the dictionary containing the current scope's global variables.

+NOTE: Updates to this dictionary *will* affect name lookups in the current
+global scope and vice-versa.
+
hasattr(obj, name, /)
Return whether the object has an attribute with the given name.

+This is done by calling getattr(obj, name) and catching AttributeError.
+
hash(obj, /)
Return the hash value for the given object.

+Two objects that compare equal must also have the same hash value, but the
+reverse is not necessarily true.
+
hex(number, /)
Return the hexadecimal representation of an integer.

+>>> hex(12648430)
+'0xc0ffee'
+
id(obj, /)
Return the identity of an object.

+This is guaranteed to be unique among simultaneously existing objects.
+(CPython uses the object's memory address.)
+
input(prompt='', /)
Read a string from standard input.  The trailing newline is stripped.

+The prompt string, if given, is printed to standard output without a
+trailing newline before reading input.

+If the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise EOFError.
+On *nix systems, readline is used if available.
+
isinstance(obj, class_or_tuple, /)
Return whether an object is an instance of a class or of a subclass thereof.

+A tuple, as in ``isinstance(x, (A, B, ...))``, may be given as the target to
+check against. This is equivalent to ``isinstance(x, A) or isinstance(x, B)
+or ...`` etc.
+
issubclass(cls, class_or_tuple, /)
Return whether 'cls' is derived from another class or is the same class.

+A tuple, as in ``issubclass(x, (A, B, ...))``, may be given as the target to
+check against. This is equivalent to ``issubclass(x, A) or issubclass(x, B)
+or ...``.
+
iter(...)
iter(iterable) -> iterator
+iter(callable, sentinel) -> iterator

+Get an iterator from an object.  In the first form, the argument must
+supply its own iterator, or be a sequence.
+In the second form, the callable is called until it returns the sentinel.
+
len(obj, /)
Return the number of items in a container.
+
locals()
Return a dictionary containing the current scope's local variables.

+NOTE: Whether or not updates to this dictionary will affect name lookups in
+the local scope and vice-versa is *implementation dependent* and not
+covered by any backwards compatibility guarantees.
+
max(...)
max(iterable, *[, default=obj, key=func]) -> value
+max(arg1, arg2, *args, *[, key=func]) -> value

+With a single iterable argument, return its biggest item. The
+default keyword-only argument specifies an object to return if
+the provided iterable is empty.
+With two or more positional arguments, return the largest argument.
+
min(...)
min(iterable, *[, default=obj, key=func]) -> value
+min(arg1, arg2, *args, *[, key=func]) -> value

+With a single iterable argument, return its smallest item. The
+default keyword-only argument specifies an object to return if
+the provided iterable is empty.
+With two or more positional arguments, return the smallest argument.
+
next(...)
next(iterator[, default])

+Return the next item from the iterator. If default is given and the iterator
+is exhausted, it is returned instead of raising StopIteration.
+
oct(number, /)
Return the octal representation of an integer.

+>>> oct(342391)
+'0o1234567'
+
ord(c, /)
Return the Unicode code point for a one-character string.
+
pow(base, exp, mod=None)
Equivalent to base**exp with 2 arguments or base**exp % mod with 3 arguments

+Some types, such as ints, are able to use a more efficient algorithm when
+invoked using the three argument form.
+
print(*args, sep=' ', end='\n', file=None, flush=False)
Prints the values to a stream, or to sys.stdout by default.

+sep
+  string inserted between values, default a space.
+end
+  string appended after the last value, default a newline.
+file
+  a file-like object (stream); defaults to the current sys.stdout.
+flush
+  whether to forcibly flush the stream.
+
repr(obj, /)
Return the canonical string representation of the object.

+For many object types, including most builtins, eval(repr(obj)) == obj.
+
round(number, ndigits=None)
Round a number to a given precision in decimal digits.

+The return value is an integer if ndigits is omitted or None.  Otherwise
+the return value has the same type as the number.  ndigits may be negative.
+
setattr(obj, name, value, /)
Sets the named attribute on the given object to the specified value.

+setattr(x, 'y', v) is equivalent to ``x.y = v``
+
sorted(iterable, /, *, key=None, reverse=False)
Return a new list containing all items from the iterable in ascending order.

+A custom key function can be supplied to customize the sort order, and the
+reverse flag can be set to request the result in descending order.
+
sum(iterable, /, start=0)
Return the sum of a 'start' value (default: 0) plus an iterable of numbers

+When the iterable is empty, return the start value.
+This function is intended specifically for use with numeric values and may
+reject non-numeric types.
+
vars(...)
vars([object]) -> dictionary

+Without arguments, equivalent to locals().
+With an argument, equivalent to object.__dict__.
+

+ + + + + +
 
Data
       Ellipsis = Ellipsis
+False = False
+None = None
+NotImplemented = NotImplemented
+True = True
+__debug__ = True
+copyright = Copyright (c) 2001-2024 Python Software Foundati...ematisch Centrum, Amsterdam. +All Rights Reserved.
+credits = Thanks to CWI, CNRI, BeOpen, Zope Corporatio...opment. See www.python.org for more information.
+exit = Use exit() or Ctrl-D (i.e. EOF) to exit
+help = Type help() for interactive help, or help(object) for help about object.
+license = Type license() to see the full license text
+quit = Use quit() or Ctrl-D (i.e. EOF) to exit
+ \ No newline at end of file diff --git a/test_claude_connection.py b/test_claude_connection.py index 84f15dd..562fd3d 100644 --- a/test_claude_connection.py +++ b/test_claude_connection.py @@ -10,6 +10,8 @@ import asyncio import sys import os from pathlib import Path +import yaml +import tempfile # Add parent directory to path for development sys.path.insert(0, str(Path(__file__).parent)) @@ -31,14 +33,29 @@ async def test_claude_connection(): print(f"✓ Found Claude binary at {claude_path}\n") - # Create browser configured for claude-code + # Create a temporary config file for claude + with tempfile.NamedTemporaryFile(mode='w', suffix='.yaml', delete=False) as f: + config = { + "servers": { + "claude-code": { + "command": [claude_path, "mcp", "serve"], + "name": "claude-code", + "description": "Claude Code MCP interface" + } + }, + "default_server": "claude-code", + "sparse_mode": True, + "enable_builtin_servers": False # Disable built-in servers for this test + } + yaml.dump(config, f) + config_path = f.name + print("Creating MCP Browser with claude-code as target...") - # We'll create a custom config for claude + # Create browser with custom config browser = MCPBrowser( - server_command=[claude_path, "mcp"], - server_name="claude-code", - sparse_mode=True # Use sparse mode to minimize context + config_path=Path(config_path), + server_name="claude-code" ) try: @@ -66,7 +83,9 @@ async def test_claude_connection(): all_tools = browser.discover("$.tools[*].name") if all_tools: print(f" Total tools discovered: {len(all_tools)}") - print(" Sample tools:", all_tools[:10]) + # Show a sample of tools + sample = all_tools[:10] if len(all_tools) > 10 else all_tools + print(f" Sample tools: {sample}") # Test 3: Try to read a file using claude's Read tool print("\n3. Testing file read capability:") @@ -77,59 +96,44 @@ async def test_claude_connection(): f.write("Hello from MCP Browser!\nThis file was created to test claude-code integration.") print(f" Created test file: {test_file}") - # Use mcp_call to invoke Read tool - response = await browser.call({ - "jsonrpc": "2.0", - "id": "test-3", - "method": "tools/call", - "params": { - "name": "mcp_call", - "arguments": { - "method": "tools/call", - "params": { - "name": "Read", # Claude's Read tool - "arguments": { - "file_path": test_file + # Use mcp_call to invoke Read tool if available + if all_tools and any('Read' in tool or 'read' in tool.lower() for tool in all_tools): + response = await browser.call({ + "jsonrpc": "2.0", + "id": "test-3", + "method": "tools/call", + "params": { + "name": "mcp_call", + "arguments": { + "method": "tools/call", + "params": { + "name": "Read", # Claude's Read tool + "arguments": { + "file_path": test_file + } } } } - } - }) - - if "result" in response: - print(" ✓ Successfully read file via claude-code!") - content = response["result"]["content"][0]["text"] - print(f" File content preview: {content[:100]}...") + }) + + if "result" in response: + print(" ✓ Successfully read file via claude-code!") + content = response["result"]["content"][0]["text"] + print(f" File content preview: {content[:100]}...") + else: + print(" ❌ Failed to read file:", response.get("error", "Unknown error")) else: - print(" ❌ Failed to read file:", response.get("error", "Unknown error")) - - # Test 4: Use onboarding - print("\n4. Testing identity-aware onboarding:") - response = await browser.call({ - "jsonrpc": "2.0", - "id": "test-4", - "method": "tools/call", - "params": { - "name": "onboarding", - "arguments": { - "identity": "ClaudeCodeTest", - "instructions": "Remember: You're testing MCP Browser integration with claude-code" - } - } - }) - - if "result" in response: - print(" ✓ Onboarding set successfully") + print(" ⚠ Read tool not found in available tools") # Clean up test file - os.remove(test_file) + if os.path.exists(test_file): + os.remove(test_file) - print("\n✅ All tests completed successfully!") - print("\nMCP Browser can successfully:") - print("- Connect to claude-code as an MCP server") - print("- List and discover available tools") - print("- Execute claude-code tools (like Read)") - print("- Use built-in features (onboarding)") + print("\n✅ Connection test completed!") + print("\nMCP Browser successfully:") + print("- Connected to claude-code as an MCP server") + print("- Listed available tools in sparse mode") + print("- Discovered all available tools via JSONPath") except Exception as e: print(f"\n❌ Error during testing: {e}") @@ -140,6 +144,10 @@ async def test_claude_connection(): print("\nClosing connection...") await browser.close() print("✓ Connection closed") + + # Clean up config file + if os.path.exists(config_path): + os.remove(config_path) if __name__ == "__main__":