使用 Ada,您可以使用and then代替and和or else代替or.
在 Ada 中,通过以下示例,当您使用惰性求值运算符时,仅在必要时(即 if ais )对 b 进行求值。true
if a
and then b
then
expr;
end if;
是否有与此等效的 Python?
使用 Ada,您可以使用and then代替and和or else代替or.
在 Ada 中,通过以下示例,当您使用惰性求值运算符时,仅在必要时(即 if ais )对 b 进行求值。true
if a
and then b
then
expr;
end if;
是否有与此等效的 Python?