Closed zickgraf closed 10 months ago
This looks good to me, and I certainly can't think of any bugs this could introduce. It's obviously hard to add a test for, but looks correct. Good catch!
With regards the error, I personally would be tempted to instead add this as an "InfoWarning", at level 1. This means if anyone does have code which is relying on this behaviour (honestly, I'm not positive how they would be), it will at least still run. However, I imagine in most cases where people write such code it is an error.
With regards the error, I personally would be tempted to instead add this as an "InfoWarning", at level 1.
(How) could I use "InfoWarning" from C code?
(How) could I use "InfoWarning" from C code?
I guess one could import InfoWarning
from the library "as usual", and then use the kernel helper InfoCheckLevel
to check the level, and use that to wrap a Pr
call.
The old logic iterated over a list while modifying this list, effectively skipping every second open file.
To avoid such errors in my own code, I have added an error to my GAP which triggers if I remove elements from a list while iterating over it: https://github.com/zickgraf/gap/commit/f8d4c3548275eef87bacb5c105ac230348cf4b01. Would this be a welcome change for GAP?