Skip to content

Commit c10623f

Browse files
user202729tscrim
andauthored
Apply suggestions from code review
Co-authored-by: Travis Scrimshaw <[email protected]>
1 parent f322060 commit c10623f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/sage/arith/misc.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3498,7 +3498,8 @@ def crt(a, b, m=None, n=None):
34983498

34993499

35003500
def CRT_list(values, moduli=None):
3501-
r""" Given a list ``values`` of elements and a list of corresponding
3501+
r"""
3502+
Given a list ``values`` of elements and a list of corresponding
35023503
``moduli``, find a single element that reduces to each element of
35033504
``values`` modulo the corresponding moduli.
35043505
@@ -3600,7 +3601,7 @@ def CRT_list(values, moduli=None):
36003601
sage: ms
36013602
[5, 7, 9]
36023603
"""
3603-
if not isinstance(values, list) or not isinstance(moduli, (list, type(None))):
3604+
if not isinstance(values, list) or (moduli is not None and not isinstance(moduli, list)):
36043605
raise ValueError("arguments to CRT_list should be lists")
36053606
return_mod = moduli is None
36063607
if return_mod:

0 commit comments

Comments
 (0)