| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
Coercions
A tree of types that can be used to infer common types.
The tree is passed in as nested sequences.
>>> c = Coercions(_CoercNode('bar', (_CoercNode('foo'), _CoercNode('baz', ... (_CoercNode('quux'),))))) >>> c.getSubsuming([]) 'bar' >>> c.getSubsuming(['foo']) 'foo' >>> c.getSubsuming(['foo', 'foo']) 'foo' >>> c.getSubsuming(['foo', 'quux']) 'bar' >>> c.getSubsuming(['foo', 'weird']) 'bar'
| Instance Methods | |||
|
|||
|
|||
|
Inherited from |
|||
| Properties | |
|
Inherited from |
| Method Details |
x.__init__(...) initializes x; see help(type(x)) for signature
|
returns the least general type being able to represent all types within typeSeq. The method returns the root type for both an empty typeSeq or a typeSeq containing an unknown type. We don't want to fail here, and the "all-encompassing" type should handle any crap. |
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |