syn.type.a package

Submodules

syn.type.a.ext module

class syn.type.a.ext.Callable

Bases: syn.type.a.type.TypeExtension

The value must be callable.

check(value)
display()
generate(**kwargs)
class syn.type.a.ext.Sequence(item_type, seq_type=<class '_abcoll.Sequence'>)

Bases: syn.type.a.type.TypeExtension

The value must be a sequence whose values are the provided type.

check(values)
coerce(values, **kwargs)
display()
generate(**kwargs)
item_type
register_generable = True
rst()
seq_type
class syn.type.a.ext.Tuple(types, length=None, uniform=False)

Bases: syn.type.a.type.TypeExtension

For defining tuple types.

check(values)
coerce(values, **kwargs)
display()
generate(**kwargs)
length
register_generable = True
rst()
types
uniform
class syn.type.a.ext.Mapping(value_type, map_type=<class '_abcoll.Mapping'>)

Bases: syn.type.a.type.TypeExtension

The value must be a mapping whose values are the provided type.

check(dct)
coerce(dct, **kwargs)
display()
generate(**kwargs)
map_type
register_generable = True
rst()
value_type
class syn.type.a.ext.Hashable

Bases: syn.type.a.type.TypeExtension

The value must be hashable.

check(value)
display()
generate(**kwargs)
class syn.type.a.ext.This

Bases: syn.type.a.type.TypeExtension

syn.type.a.type module

class syn.type.a.type.Type

Bases: object

A representation for various possible types syn supports.

check(value)
coerce(value, **kwargs)
classmethod dispatch(obj)
display()

Returns a quasi-intuitive string representation of the type.

enumeration_value(x, **kwargs)

Return the enumeration value for x for this type.

generate(**kwargs)

Returns a value for this type.

query(value)
query_exception(value)
register_generable = False
rst()

Returns a string representation of the type for RST documentation.

validate(value)
class syn.type.a.type.AnyType

Bases: syn.type.a.type.Type

check(value)
coerce(value, **kwargs)
display()
enumeration_value(x, **kwargs)
generate(**kwargs)
validate(value)
class syn.type.a.type.TypeType(typ)

Bases: syn.type.a.type.Type

call_coerce
call_validate
check(value)
coerce(value, **kwargs)
display()
enumeration_value(x, **kwargs)
generate(**kwargs)
register_generable = True
rst()
type
validate(value)
class syn.type.a.type.ValuesType(values)

Bases: syn.type.a.type.Type

A set (or list) of values, any of which is valid.

Think of this is a denotational definition of the type.

check(value)
coerce(value, **kwargs)
display()
enumeration_value(x, **kwargs)
generate(**kwargs)
indexed_values
register_generable = True
validate(value)
values
class syn.type.a.type.MultiType(types)

Bases: syn.type.a.type.Type

A tuple of type specifiers, any of which may be valid.

check(value)
coerce(value, **kwargs)
display()
enumeration_value(x, **kwargs)
generate(**kwargs)
is_typelist
register_generable = True
rst()
typelist
typemap
types
typestr
validate(value)
class syn.type.a.type.Set(set)

Bases: syn.type.a.type.Type

For explicitly wrapping a SetNode as a type (since automatic dispatching cannot be implemented at this level).

check(value)
coerce(value, **kwargs)
display()
generate(**kwargs)
register_generable = True
validate(value)
class syn.type.a.type.Schema(schema)

Bases: syn.type.a.type.Type

For explicitly wrapping a Schema as a type (since automatic dispatching cannot be implemented at this level).

check(value)
coerce(value, **kwargs)
display()
generate(**kwargs)
register_generable = True
validate(value)
class syn.type.a.type.TypeExtension

Bases: syn.type.a.type.Type

For extending the type system.

validate(value)

Module contents