We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5ff7b43 + 2752aeb commit 2a72cd5Copy full SHA for 2a72cd5
2 files changed
mathics/builtin/algebra.py
@@ -205,7 +205,7 @@ def find_vars(e, e_sympy):
205
return
206
elif e.is_symbol():
207
variables.add(e)
208
- elif e.has_form("Plus", None) or e.has_form("Times", None):
+ elif e.has_form(("Plus", "Times"), None):
209
for l in e.leaves:
210
l_sympy = l.to_sympy()
211
if l_sympy is not None:
mathics/builtin/files.py
@@ -2479,9 +2479,7 @@ class Close(Builtin):
2479
def apply(self, channel, evaluation):
2480
"Close[channel_]"
2481
2482
- if channel.has_form("InputStream", 2) or channel.has_form( # noqa
2483
- "OutputStream", 2
2484
- ):
+ if channel.has_form(("InputStream", "OutputStream"), 2):
2485
[name, n] = channel.get_leaves()
2486
stream = stream_manager.lookup_stream(n.get_int_value())
2487
else:
0 commit comments