exporting patch:
# HG changeset patch
# User Julian Rueth <julian.rueth@gmail.com>
Trac 9054: check category in is_FunctionField()
diff git a/sage/rings/function_field/function_field.py b/sage/rings/function_field/function_field.py
index cdca9d2..4b64405 100644
a

b

def is_FunctionField(x): 
76  76  sage: is_FunctionField(FunctionField(QQ,'t')) 
77  77  True 
78  78  """ 
79   return isinstance(x, FunctionField) 
80   
 79  if isinstance(x, FunctionField): return True 
 80  from sage.categories.function_fields import FunctionFields 
 81  return x in FunctionFields() 
81  82  
82  83  class FunctionField(Field): 
83  84  """ 
diff git a/sage/rings/function_field/function_field_element.pyx b/sage/rings/function_field/function_field_element.pyx
index d45f523..9d0babd 100644
a

b

def is_FunctionFieldElement(x): 
14  14  sage: sage.rings.function_field.function_field_element.is_FunctionFieldElement(0) 
15  15  False 
16  16  """ 
17   return isinstance(x, FunctionFieldElement) 
 17  if isinstance(x, FunctionFieldElement): return True 
 18  from function_field import is_FunctionField 
 19  return is_FunctionField(x.parent()) 
18  20  
19  21  def make_FunctionFieldElement(parent, element_class, representing_element): 
20  22  """ 