Opened 15 years ago

Closed 15 years ago

#380 closed defect (fixed)

bug when defining a relative extension

Reported by: was Owned by: was
Priority: major Milestone:
Component: number theory Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


Dimitar Jetchev found the following bug:

sage: k.<a> = NumberField(x^2+1); k
Number Field in a with defining polynomial x^2 + 1
sage: m.<b> = k.extension(y^2+1); m

and it fails .... it says: variable name should be alphanumeric.

Change History (1)

comment:1 Changed 15 years ago by was

  • Resolution set to fixed
  • Status changed from new to closed
# HG changeset patch
# User William Stein <>
# Date 1180147432 25200
# Node ID d5baafd9ca025979d8ac8558d9bc54cedd77904e
# Parent  430c6cb23845fe12c69fed0cb063646c1a87c3d0
Fix trac #380: bug when defining a relative extension

diff -r 430c6cb23845 -r d5baafd9ca02 sage/rings/number_field/
--- a/sage/rings/number_field/   Fri May 25 17:36:34 2007 -0700
+++ b/sage/rings/number_field/   Fri May 25 19:43:52 2007 -0700
@@ -531,7 +531,7 @@ class NumberField_generic(field.Field):
             name = name[0]
         if name is None:
             raise TypeError, "the variable name must be specified."
-        return NumberField_extension(self, poly, repr(name))
+        return NumberField_extension(self, poly, str(name))

     def factor_integer(self, n):
Note: See TracTickets for help on using tickets.