You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppose I have a subclass of list or another class with the same "interface" (say, PersistentList from ZODB). There doesn't seem to be simple way to have a SequenceSchema deserialize to it.
First I have to create a colander.Sequence subclass, override the _impl method, call super, then convert the result to PersistentList before returning it. Then I have to set this colander.Sequence subclass as the schema_type attribute of a SequenceSchema subclass.
It would be nice to have a concrete_class (or concrete_factory) attribute/parameter that could be passed to SchemaNode, which would then be passed to the schema_type constructor which would use it as the constructor of the desserialized appstruct.
The text was updated successfully, but these errors were encountered:
Suppose I have a subclass of
list
or another class with the same "interface" (say,PersistentList
from ZODB). There doesn't seem to be simple way to have aSequenceSchema
deserialize to it.First I have to create a
colander.Sequence
subclass, override the_impl
method, callsuper
, then convert the result toPersistentList
before returning it. Then I have to set thiscolander.Sequence
subclass as theschema_type
attribute of aSequenceSchema
subclass.It would be nice to have a
concrete_class
(orconcrete_factory
) attribute/parameter that could be passed toSchemaNode
, which would then be passed to theschema_type
constructor which would use it as the constructor of the desserialized appstruct.The text was updated successfully, but these errors were encountered: