mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Summary: add support for : `a = b, c = (1, 2)` partial fix for https://github.com/pytorch/pytorch/issues/24256 Pull Request resolved: https://github.com/pytorch/pytorch/pull/24477 Differential Revision: D16963413 Pulled By: eellison fbshipit-source-id: 0433a1e759b3aa719ef1b766bb5160f2ca814205
85 lines
1.7 KiB
Plaintext
85 lines
1.7 KiB
Plaintext
(def
|
|
(ident fn)
|
|
(decl
|
|
(list
|
|
(param
|
|
(ident x)
|
|
(option)
|
|
(option)
|
|
(False))
|
|
(param
|
|
(ident y)
|
|
(option)
|
|
(option)
|
|
(False))
|
|
(param
|
|
(ident z)
|
|
(option)
|
|
(option)
|
|
(False)))
|
|
(option))
|
|
(list
|
|
(assign
|
|
(list (variable (ident q)))
|
|
(option (None))
|
|
(option))
|
|
(assign
|
|
(list (variable (ident q)))
|
|
(option
|
|
(-
|
|
(+
|
|
(variable (ident x))
|
|
(variable (ident y)))
|
|
(apply
|
|
(.
|
|
(variable (ident z))
|
|
(ident sigmoid))
|
|
(list)
|
|
(list))))
|
|
(option))
|
|
(expression statement
|
|
(apply
|
|
(variable (ident print))
|
|
(list (variable (ident q)))
|
|
(list)))
|
|
(assign
|
|
(list (variable (ident w)))
|
|
(option
|
|
(unary minus
|
|
(variable (ident z))))
|
|
(option))
|
|
(if
|
|
(and
|
|
(and
|
|
(not (variable (ident x)))
|
|
(not (variable (ident y))))
|
|
(variable (ident z)))
|
|
(list
|
|
(assign
|
|
(list (variable (ident m)))
|
|
(option
|
|
(if
|
|
(not
|
|
(variable (ident z)))
|
|
(variable (ident x))
|
|
(variable (ident y))))
|
|
(option)))
|
|
(list))
|
|
(while
|
|
(and
|
|
(<
|
|
(variable (ident x))
|
|
(variable (ident y)))
|
|
(>
|
|
(variable (ident y))
|
|
(variable (ident z))))
|
|
(list
|
|
(assign
|
|
(list (variable (ident q)))
|
|
(option (variable (ident x)))
|
|
(option))))
|
|
(assert
|
|
(eq (const 1) (const 1))
|
|
(option (string_literal hello)))
|
|
(return (variable (ident x)))))
|