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
This is because the list print method does not print the parent list element when the child is a classed list, presumably because it does not want to interfere with a potential print method of the child, but I think that's probably bad.
A possible solution would be to make the tag buffer reset the responsibility of printValueRec, where it would record on first call that print recursion is active and on exit reset the tag buffer.
There are two obvious issues with this:
The code becomes more complex because in addition to the global recursion state variable, we also need to add a context so we can have an on.exit cleanup in case something along the print recursion triggers an error or similar. There already is a context that is ifdef'ed for win32, so we'd have to combine that handling. Not sure what the performance implications of that are.
If the author of a print method for an S3/S4 object relies internally on the default print methods, they will expect the tag buffer to be reset for them. This means we need a way to recognize that print.default was called internally by the C print recursion code, vs by a the owner of an object print method.
Should preserve one more $qr
The text was updated successfully, but these errors were encountered: