Skip to content

ivalue field in integer_mod.pyx shouldn't be public #3571

@craigcitro

Description

@craigcitro

The ivalue field for IntegerMod_int is public, but it shouldn't be. The following is very frightening, for instance:

sage: R = Integers(10)
sage: x = R(2)
sage: x
2
sage: x.ivalue = 33
sage: x
33
sage: R(2)
33

It's easy to make this field no longer be public, but lots of things are using the fact that it is, so one needs to go through and make everything work correctly again.

Component: basic arithmetic

Issue created by migration from https://trac.sagemath.org/ticket/3571

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions