Skip to content

Commit 2306b38

Browse files
committed
Apply suggested changes
1 parent 803a2fe commit 2306b38

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sage/schemes/weighted_projective/weighted_projective_point.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ def __init__(self, X, v, check: bool = True):
103103
raise TypeError("v (=%s) must have %s components" % (v, d))
104104

105105
R = X.value_ring()
106+
if not R.is_integral_domain():
107+
raise ValueError("cannot validate point over a ring that is not an integral domain, "
108+
"pass check=False to construct the point")
106109
v = Sequence(v, R)
107110
if len(v) == d-1: # very common special case
108111
v.append(R.one())
@@ -112,9 +115,6 @@ def __init__(self, X, v, check: bool = True):
112115
raise ValueError(f"{v} does not define a valid projective "
113116
"point since all entries are zero")
114117

115-
# over other rings, we do not have a generic method to check
116-
# whether the given coordinates is a multiple of a zero divisor
117-
# so we just let it pass.
118118
X.extended_codomain()._check_satisfies_equations(v)
119119

120120
self._coords = tuple(v)

0 commit comments

Comments
 (0)