b.inspect_for_copy : module documentation

Part of bzrlib

A version of inspect that includes what 'copy' needs.

Importing the python standard module 'copy' is far more expensive than it needs to be, because copy imports 'inspect' which imports 'tokenize'. And 'copy' only needs 2 small functions out of 'inspect', but has to load all of 'tokenize', which makes it horribly slow.

This module is designed to use tricky hacks in import rules, to avoid this overhead.

Function getmro Return tuple of base classes (including cls) in method resolution order.
Function import_copy_with_hacked_inspect Import the 'copy' module with a hacked 'inspect' module
Function _searchbases Undocumented
def _searchbases(cls, accum):
Undocumented
def getmro(cls):
Return tuple of base classes (including cls) in method resolution order.
def import_copy_with_hacked_inspect():
Import the 'copy' module with a hacked 'inspect' module
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.