mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
gh-126835: Move constant unaryop & binop folding to CFG (#129550)
This commit is contained in:
parent
d88677ac20
commit
38642bff13
6 changed files with 1057 additions and 443 deletions
|
@ -1,5 +1,5 @@
|
|||
def to_tuple(t):
|
||||
if t is None or isinstance(t, (str, int, complex, float, bytes)) or t is Ellipsis:
|
||||
if t is None or isinstance(t, (str, int, complex, float, bytes, tuple)) or t is Ellipsis:
|
||||
return t
|
||||
elif isinstance(t, list):
|
||||
return [to_tuple(e) for e in t]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue