Module: generate

Table of Contents

Module: generate | ./src/protocols/generate.py
--- | ---
Autogenerated protocols from type+method names, URI, sequence, etc.
Imported modules |
--- | ---
from adapters import NO_ADAPTER_NEEDED from advice import metamethod, supermeta from api import declareAdapterForProtocol, declareAdapterForType, declareAdapter, adapt from interfaces import Protocol, allocate_lock, Interface
Functions |
ADAPT_SEQUENCE __protocolForType protocolForType protocolForURI sequenceOf
| ADAPT_SEQUENCE
    ADAPT_SEQUENCE ( ob,  proto )
Convert iterable `ob` into list of objects implementing `proto`
| __protocolForType
    __protocolForType ( key )
Recursive implementation of protocolForType; assumes standardized key
| protocolForType
    protocolForType (
            baseType,
            methods=(),
            implicit=False,
            )
Return a protocol representing a subset of methods of a specific type
| protocolForURI
    protocolForURI ( uri )
Return a unique protocol object representing the supplied URI/UUID
| sequenceOf
    sequenceOf ( baseProtocol )
Return a protocol representing an sequence of a given base protocol
Classes |
IBasicSequence | Non-string, iterable object sequence
SequenceProtocol | Protocol representing a "sequence of" some base protocol
TypeSubset | Protocol representing some set of a type's methods
URIProtocol | Protocol representing a URI, UUID, or other unique textual identifier
WeakSubset | TypeSubset that accepts any object with the right attributes

Table of Contents

This document was automatically generated on Mon Sep 27 00:39:12 2004 by HappyDoc version 2.1