Dedum … using
tuple(stuff) if stuff else ()instead ofelse Nonehas effects for all classes that we pass to TG as arguments for something. I'll have to have a closer look on whether we like that or not … maybe not today though
I addressed this by making to_dict drop empty sequences.
So far, I see only one side-effect of this: if there is any class attribute where it makes a difference if we pass an empty array or nothing at all, this will be a problem. I have not found such an instance. If there is one in the future, one could override to_dict.
If there are other side-effects or concerns about this change that I did not see, please do tell. Personally, I like the consistency of having all sequence-type attributes always being tuples instead of None.