ilya <palachev.i...@yandex.ru> added the comment:
> apply was a builtin in Python 2 and not sure 2to3 can differentiate between > user defined functions that shadow builtins. > https://docs.python.org/3.8/library/2to3.html#2to3fixer-apply . > Removes usage of apply(). For example apply(function, *args, **kwargs) is > converted to function(*args, **kwargs). > You can skip the apply fixer: 2to3 -x apply /tmp/bar.py The problem is that the code is valid both for Python2 and Python3 (for Python3, there is even no builtin shadowing, because there is no apply builtin actually), and fix_apply breaks it. I'm testing the quality of 2to3 fixers and found this issue. I know that it's possible to switch this fixer off, but it doesn't seem to be a proper solution because any other bug could have the same answer. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39670> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com