Module b.inspect_for_copy

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.

Line # Kind Name Docs
45 Function getmro Return tuple of base classes (including cls) in method resolution order.
55 Function import_copy_with_hacked_inspect Import the 'copy' module with a hacked 'inspect' module
36 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 BzrLib, generated by pydoctor at 2008-12-03 00:00:12.