Ticket #3370 (closed defect: fixed)
[with patch, positive review] converting strings to ZZ[x,y] fails
| Reported by: | burcin | Owned by: | malb |
|---|---|---|---|
| Priority: | major | Milestone: | sage-3.0.3 |
| Component: | commutative algebra | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
With 3.0.2:
sage: P.<x,y> = ZZ[]
sage: P('x+y')
TypeError Traceback (most recent call last)
/home/burcin/work/sage/sage-3.0.2/<ipython console> in <module>()
/home/burcin/work/sage/sage-3.0.2/local/lib/python2.5/site-packages/sage/rings/polynomial/multi_polynomial_ring.py in __call__(self, x, check)
386
387 elif isinstance(x , str) and self._has_singular:
--> 388 self._singular_().set_ring()
389 try:
390 return self._singular_().parent(x).sage_poly(self)
/home/burcin/work/sage/sage-3.0.2/local/lib/python2.5/site-packages/sage/rings/polynomial/polynomial_singular_interface.py in _singular_(self, singular, force)
172 return R
173 except (AttributeError, ValueError):
--> 174 return self._singular_init_(singular, force)
175
176 def _singular_init_(self, singular=singular_default, force=False):
/home/burcin/work/sage/sage-3.0.2/local/lib/python2.5/site-packages/sage/rings/polynomial/polynomial_singular_interface.py in _singular_init_(self, singular, force)
243
244 else:
--> 245 raise TypeError, "no conversion to a Singular ring defined"
246
247 return self.__singular
TypeError: no conversion to a Singular ring defined
Attached patch fixes this problem.
Attachments
Change History
Changed 5 years ago by burcin
-
attachment
string_to_ZZxy_conversion.patch
added
comment:1 Changed 5 years ago by malb
- Summary changed from [with patch, needs review] converting strings to ZZ[x,y] fails to [with patch, positive review] converting strings to ZZ[x,y] fails
patch looks good.
Note: See
TracTickets for help on using
tickets.

convert strings to mpolynomials using sage_eval