Jun-21-2024, 05:47 AM
Quote:i wish there was a way to have a run-time insert operation that would have all the exact effects of doing an insert.
what is your goal, if it may be asked?
I'm not sure, but exec behaves somewhat differently, may be it is closer to what you want to achieve? e.g. read the file to be "inserted" and
exec it, e.g.:
x = 5 exec('x=7\ndel x') print(x) #throws x not defined