aboutsummaryrefslogtreecommitdiff
path: root/pyecsca/ec/mod/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyecsca/ec/mod/base.py')
-rw-r--r--pyecsca/ec/mod/base.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/pyecsca/ec/mod/base.py b/pyecsca/ec/mod/base.py
index 67e2b97..f5aab09 100644
--- a/pyecsca/ec/mod/base.py
+++ b/pyecsca/ec/mod/base.py
@@ -127,10 +127,8 @@ class Mod:
"""
An element x of ℤₙ.
- .. note::
- This class dispatches to one of :py:class:`RawMod`, :py:class:`GMPMod` or :py:class:`FlintMod`
- based on what packages are installed and what implementation is configured (see
- :py:mod:`pyecsca.misc.cfg`).
+ .. attention:
+ Do not instantiate this class, it will not work, instead use the :py:func:`mod` function.
Has all the usual special methods that upcast integers automatically:
@@ -350,6 +348,11 @@ def mod(x: int, n: int) -> Mod:
"""
Construct a :py:class:`Mod`.
+ .. note::
+ This function dispatches to one of :py:class:`RawMod`, :py:class:`GMPMod` or :py:class:`FlintMod`
+ based on what packages are installed and what implementation is configured (see
+ :py:mod:`pyecsca.misc.cfg`).
+
:param x: The value.
:param n: The modulus.
:return: A selected Mod implementation object.