pfff is mainly an OCaml API to write static analysis, dynamic analysis, code visualizations, code navigations, or style-preserving source-to-source transformations such as refactorings on source code.
Python parses x[1, 2] and x[(1, 2)] into the same AST. pfff should
too.
This addresses the (presumably) more normal case where each tuple
element is an ordinary expression. However, individual tuple elements
can also be slices. I did not change the behavior of the parser in cases
where one or more of these elements is a slice. See comments for more
information.
Security
[x] Change has no security implications (otherwise, ping the security team)
Python parses
x[1, 2]
andx[(1, 2)]
into the same AST. pfff should too.This addresses the (presumably) more normal case where each tuple element is an ordinary expression. However, individual tuple elements can also be slices. I did not change the behavior of the parser in cases where one or more of these elements is a slice. See comments for more information.
Security