References

class Ref(value=Unspecified, **kw)

Bases: flatland.schema.scalars.Scalar

adapt(value)

Given any value, 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 value, coerce it into a Unicode representation.

Returns:Must return a Unicode 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 unicode(value).

u

The Unicode representation of the reference target.

value

The native value representation of the reference target.

Topics