Table of Contents

Module: once ./src/peak/binding/once.py

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   

Activator

Descriptor metadata management

ActiveClass

Metaclass for classes that are themselves components

Attribute

Descriptor for Component Attribute Bindings

AttributeClass

Help attribute classes keep class docs separate from instance docs

ComponentSetupWarning

Large iterator passed to suggestParentComponent

Descriptor

Attribute descriptor with lazy initialization and caching

Make

Make(recipe)' - Construct a value and cache it

Singleton

Class whose instances are itself, with all attributes at class level

SingletonClass

_MultiRecipe

ADAPTER: Sequence(IRecipe) --> IRecipe

_SequenceAsAttachable

Set parent component for all members of a list/tuple

_StringAsRecipe

ADAPTER: string (import spec) --> IRecipe

_TypeAsRecipe

ADAPTER: type | class --> IRecipe

classAttr

Class attribute binding


Table of Contents

This document was automatically generated on Tue Feb 17 19:55:38 2004 by HappyDoc version 2.1