29 ms·
Codemods aren't a thing in Python?
by k__ 4y ago
Codemods aren't a thing in Python?
- qbasic_forever 4y agoThey are a thing, the ast module was created to help with the transition and tooling to automate some of the conversion: https://docs.python.org/3/library/ast.html https://docs.python.org/3/library/ast.html IIRC it wasn't there at the start though.
- marssaxman 4y agoWhat is a "codemod"?
- deleted 4y ago[deleted]
- charcircuit 4y agoA codemod is an automated refactor. Codemods are typically done by writing scripts that manipulate the AST of code in files or by writing a regex to find and replace. The name originates from an internal script at Facebook called codemod. It had a public open source fork if you are curious. https://github.com/facebookarchive/codemod https://github.com/facebookarchive/codemod
- marssaxman 4y agoThanks for the explanation!