API Reference for Enthought Tool Suite 3.2.0
Basic Adapters and Adapter Operations
Backward compatibility: wrap 'adapter' to support old 2-arg signature
Return the composition of 'baseAdapter'+'extendingAdapter'
Prevent 'obj' from supporting 'protocol'
Shortest route to implementation, 'a1' @ depth 'd1', or 'a2' @ 'd2'?
Assuming both a1 and a2 are interchangeable adapters (i.e. have the same source and destination protocols), return the one which is preferable; that is, the one with the shortest implication depth, or, if the depths are equal, then the adapter that is composed of the fewest chained adapters. If both are the same, then prefer 'NO_ADAPTER_NEEDED', followed by anything but 'DOES_NOT_SUPPORT', with 'DOES_NOT_SUPPORT' being least preferable. If there is no unambiguous choice, and 'not a1 is a2', TypeError is raised.
Assume 'obj' implements 'protocol' directly
Replace 'mapping[key]' w/'adapter' @ 'depth', return true if changed
| Local name | Refers to |
|---|---|
| ClassType | types.ClassType |
| FunctionType | types.FunctionType |
| MethodType | types.MethodType |
© Copyright 2002-2009 Enthought, Inc.