def __init__(self, base, p, prec, print_mode, names, element_class, category=None): """ Initialization. INPUT: - base -- Base ring. - p -- prime - print_mode -- dictionary of print options - names -- how to print the uniformizer - element_class -- the class for elements of this ring EXAMPLES:: sage: R = Zp(17) #indirect doctest """ if category is None: if self.is_field(): category = Fields() else: category = PrincipalIdealDomains() category = category.Metric().Complete() LocalGeneric.__init__(self, base, prec, names, element_class, category) self._printer = pAdicPrinter(self, print_mode)
def __init__(self, base, p, prec, print_mode, names, element_class): """ Initialization. INPUTS:: - base -- Base ring. - p -- prime - print_mode -- dictionary of print options - names -- how to print the uniformizer - element_class -- the class for elements of this ring EXAMPLES:: sage: R = Zp(17) #indirect doctest """ LocalGeneric.__init__(self, base, prec, names, element_class) self._printer = pAdicPrinter(self, print_mode)
def __init__(self, base, p, prec, print_mode, names, element_class, category=None): """ Initialization. INPUTS:: - base -- Base ring. - p -- prime - print_mode -- dictionary of print options - names -- how to print the uniformizer - element_class -- the class for elements of this ring EXAMPLES:: sage: R = Zp(17) #indirect doctest """ if category is None: if self.is_field(): category = Fields() else: category = PrincipalIdealDomains() LocalGeneric.__init__(self, base, prec, names, element_class, category) self._printer = pAdicPrinter(self, print_mode)