Message362243
| Author |
ilya |
| Recipients |
ilya, xtreak |
| Date |
2020年02月19日.02:08:26 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1582078106.99.0.400267554291.issue39670@roundup.psfhosted.org> |
| In-reply-to |
| Content |
> 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. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2020年02月19日 02:08:27 | ilya | set | recipients:
+ ilya, xtreak |
| 2020年02月19日 02:08:26 | ilya | set | messageid: <1582078106.99.0.400267554291.issue39670@roundup.psfhosted.org> |
| 2020年02月19日 02:08:26 | ilya | link | issue39670 messages |
| 2020年02月19日 02:08:26 | ilya | create |
|