Once objects and classes
Imported modules
|
|
from __future__ import generators
from _once import *
from interfaces import IAttachable, IActiveDescriptor, IRecipe
from peak.api import NOT_FOUND, protocols, adapt
from peak.config.interfaces import IConfigKey
from peak.util.imports import importObject, importString
from peak.util.signature import ISignature, getPositionalArgs
from protocols import IOpenProvider, IOpenImplementor, NO_ADAPTER_NEEDED
from protocols.advice import metamethod, getMRO
from types import ClassType
from warnings import warn
|
Functions
|
|
Copy
_callableAsRecipe
_configKeyAsRecipe
getInheritedRegistries
suggestParentComponent
supertype
|
|
Copy
|
Copy ( obj, **kw )
DEPRECATED: Use Make(lambda: copy(obj)) or Make(lambda: expr)
|
|
_callableAsRecipe
|
_callableAsRecipe ( func, protocol )
|
|
_configKeyAsRecipe
|
_configKeyAsRecipe ( ob, proto )
|
|
getInheritedRegistries
|
getInheritedRegistries ( klass, registryName )
Minimal set of registryName registries in reverse MRO order
|
|
suggestParentComponent
|
suggestParentComponent (
parent,
name,
child,
)
Suggest to child that it has parent and name
If child does not support IAttachable and is a container that derives
from tuple or list , all of its elements that support IAttachable
will be given a suggestion to use parent and name as well. Note that
this means it would not be a good idea to use this on, say, a 10,000
element list (especially if the objects in it aren't components), because
this function has to check all of them.
|
|
supertype
|
supertype ( supertype, subtype )
Workaround for super() not handling metaclasses well
Note that this will skip any classic classes in the MRO!
Exceptions
|
|
TypeError( "Not sub/supertypes:", supertype, subtype )
|
|
Classes
|
|
|
|