Hello list,

could this (see below) be a bug?
When I try Zmod(17)(4).multiplicative_order(), I get 4 as expected. But not 
with 257 as modulus:


sage: R=Zmod(257)
sage: R(4)
4
sage: R(4).multiplicative_order()
8
sage: Zmod(257)(4).mutliplicative_order()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-55-f15ea556676b> in <module>
----> 1 Zmod(Integer(257))(Integer(4)).mutliplicative_order()

/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/structure/element.pyx
 in sage.structure.element.Element.__getattr__ 
(build/cythonized/sage/structure/element.c:4832)()
    492             AttributeError: 
'LeftZeroSemigroup_with_category.element_class' object has no attribute 
'blah_blah'
    493         """
--> 494         return self.getattr_from_category(name)
    495 
    496     cdef getattr_from_category(self, name):

/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/structure/element.pyx
 in sage.structure.element.Element.getattr_from_category 
(build/cythonized/sage/structure/element.c:4944)()
    505         else:
    506             cls = P._abstract_element_class
--> 507         return getattr_from_other_class(self, cls, name)
    508 
    509     def __dir__(self):

/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/cpython/getattr.pyx
 in sage.cpython.getattr.getattr_from_other_class 
(build/cythonized/sage/cpython/getattr.c:2703)()
    359         dummy_error_message.cls = type(self)
    360         dummy_error_message.name = name
--> 361         raise AttributeError(dummy_error_message)
    362     attribute = <object>attr
    363     # Check for a descriptor (__get__ in Python)

AttributeError: 'sage.rings.finite_rings.integer_mod.IntegerMod_int' object has 
no attribute 'mutliplicative_order'
sage: 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/0CDDF024-3CC1-4FCD-BFE2-F5B22566AE65%40me.com.

Reply via email to