Skip to content

Commit

Permalink
update docs for Converter.lazy attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed May 14, 2024
1 parent 32a4e42 commit 6fffde9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/asdf/extending/converters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ when some logic is required to select the tag to assign to a ``to_yaml_tree`` re
`Converter.select_tag<Converter>` - an optional method that accepts a complex Python object and a list
candidate tags and returns the tag that should be used to serialize the object.

`Converter.lazy` - a boolean attribute indicating if this converter accepts "lazy" objects
(those defined in `asdf.lazy_nodes`). This is mostly useful for container-like classes
(where the "lazy" objects can defer conversion of contained objects until they are accessed).
If a converter produces a generator lazy should be set to ``False`` as asdf will need
to generate nodes further out the branch to fully resolve the object returned from the
generator.


A simple example
================

Expand Down

0 comments on commit 6fffde9

Please sign in to comment.