If you implemented this in __getattr__
it shouldn’t require a change in VTK itself. Let’s say instead of invoking execute()
you simply access a output
attribute. __getattr__
could perform the update on the pipeline when it the attribute output
is requested and give you the result. The implementation would, I suspect, be very similar to the implementation of an execute()
function. It’s mainly a syntactic preference in my view. The main advantage of an attribute is it is perhaps easier to name - you don’t have to find a verb that also indicates a noun is returned.
That’s a good point about multiple outputs. How would this be handled with either an execute()
or a output
attribute? Return a tuple of VTK objects?