Message414888
This is the right place to file an issue.
Your code is incorrect; it will find only top-level functions. Functions within an `if` statement will be nested inside an `ast.If` node. To find all functions in a file, you'll need to recurse into nested nodes. For example, you could use `ast.walk`, an `ast.NodeVisitor`, or manually check for nodes like `ast.If`. Which one is best depends on your needs. For example, the first two will also find methods in classes. The ast module documentation has more information. |
|
Date |
User |
Action |
Args |
2022-03-11 04:09:18 | JelleZijlstra | set | recipients:
+ JelleZijlstra, lys.nikolaou, pablogsal, Ruishi |
2022-03-11 04:09:18 | JelleZijlstra | set | messageid: <1646971758.29.0.315506426441.issue46980@roundup.psfhosted.org> |
2022-03-11 04:09:18 | JelleZijlstra | link | issue46980 messages |
2022-03-11 04:09:18 | JelleZijlstra | create | |
|