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
the implementation could probably be setting a boolen attribute _generator_consumed = True on nodes that has a single generator child node and then checking for that existence (in _iter_chunks()).
This is slightly backwards incompatible but I would consider code that relies on this behavior to already be broken so I think we can just change this. Feel free to submit a PR for this!
The text was updated successfully, but these errors were encountered:
In #101 @JakobGM pointed out that creating an element with a generator is a foot gun that can lead to unexpected results.
Instead of silently rendering empty elements, we should raise an error when trying to render a element with a generator child node the second time.
A test could be something like:
the implementation could probably be setting a boolen attribute
_generator_consumed = True
on nodes that has a single generator child node and then checking for that existence (in_iter_chunks()
).This is slightly backwards incompatible but I would consider code that relies on this behavior to already be broken so I think we can just change this. Feel free to submit a PR for this!
The text was updated successfully, but these errors were encountered: