References

class Ref(value=Unspecified, **kw)

Bases: flatland.schema.scalars.Scalar

adapt(value)

Given any object obj, try to coerce it into native format.

Returns

the native format or raises AdaptationError on failure.

This abstract method is called by set().

serialize(value)

Given any object obj, coerce it into a text representation.

Returns

Must return a Unicode text object, always.

No special effort is made to coerce values not of native or a compatible type.

This semi-abstract method is called by set(). The base implementation returns str(obj) (or unicode).

property u

The text representation of the reference target.

property value

The native value representation of the reference target.