Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(13)  |  Call(0)  |  Derive(13)  |  Import(0)
Individual tagged entry in a Union type.

Unlike other Type subclasses, Option classes are designed to be
directly instantiated in order to tag the contained values.  The
values contained in an instance can be obtained using standard 
item access (e.g. opt[0], opt[1], etc).

src/e/x/extprot-0.2.4/extprot/tests/test_tst.py   extprot(Download)
    class A(types.Option):
        _types = (types.Int,)
    class B(types.Option):
        _types = (types.Float,)
    class C(types.Option):
        _types = (types.Float,types.Int,types.List.build(types.String),types.Tuple.build(types.Float,types.Array.build(types.Bool),types.List.build(types.List.build(types.String))))
    class D(types.Option):
    class One(types.Option):
        _types = ()
    class Some_other(types.Option):
        _types = ()
 

src/e/x/extprot-0.2.4/extprot/tests/test_addressbook.py   extprot(Download)
    class Unset(types.Option):
        _types = ()
    class Set(types.Option):
        _types = (_unbound_types[0],)
 
 
class phone_type(types.Union):
    class Mobile(types.Option):
        _types = ()
    class Home(types.Option):
    class Work(types.Option):
        _types = ()
 
 
class person(types.Message):