[issue46193] Using a dictionary for open files.

2021-12-29 Thread Keepun
Keepun added the comment: I didn't think about calculating the argument before passing it to the function... -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.

[issue46193] Using a dictionary for open files.

2021-12-29 Thread Keepun
New submission from Keepun : """ Using a dictionary for open files. The file is filled with NULL. Only the last entry is normal. Result: 00 00 00 00 ... 00 0A 48 65 6C 6C 6F 0A Ubuntu - 3.8.10 Windows - 3.9.8 """ fhandles = {} for f in range(100): fh = fhan

[issue43448] exec() ignores scope.

2021-03-09 Thread Keepun
New submission from Keepun : exec() ignores scope. Code: -- class ExecTest: def public(self): h=None exec("h='It is public'") print(h) self._private() def _private(self): h=None exec("h=