Skip to content

Commit aab7c57

Browse files
committed
Docstring formatting after review
1 parent 72a9f16 commit aab7c57

File tree

4 files changed

+20
-14
lines changed

4 files changed

+20
-14
lines changed

src/sage/rings/finite_rings/element_base.pyx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,10 @@ cdef class FiniteRingElement(CommutativeRingElement):
144144

145145
def to_bytes(self, byteorder="big"):
146146
"""
147-
Return an array of bytes representing an integer. Internally relies
148-
on the python ``int.to_bytes()`` method. Length of byte array is
149-
determined from the field's order.
147+
Return an array of bytes representing an integer.
148+
149+
Internally relies on the python ``int.to_bytes()`` method.
150+
Length of byte array is determined from the field's order.
150151
151152
INPUT:
152153
@@ -1111,9 +1112,10 @@ cdef class FinitePolyExtElement(FiniteRingElement):
11111112

11121113
def to_bytes(self, byteorder="big"):
11131114
"""
1114-
Return an array of bytes representing an integer. Internally relies
1115-
on the python ``int.to_bytes()`` method. Length of byte array is
1116-
determined from the field's order.
1115+
Return an array of bytes representing an integer.
1116+
1117+
Internally relies on the python ``int.to_bytes()`` method.
1118+
Length of byte array is determined from the field's order.
11171119
11181120
INPUT:
11191121

src/sage/rings/finite_rings/finite_field_base.pyx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2119,8 +2119,9 @@ cdef class FiniteField(Field):
21192119

21202120
def from_bytes(self, input_bytes, byteorder="big"):
21212121
"""
2122-
Return the integer represented by the given array of bytes. Internally relies
2123-
on the python ``int.from_bytes()`` method.
2122+
Return the integer represented by the given array of bytes.
2123+
2124+
Internally relies on the python ``int.from_bytes()`` method.
21242125
21252126
INPUT:
21262127

src/sage/rings/integer.pyx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7165,8 +7165,9 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement):
71657165

71667166
def to_bytes(self, length=1, byteorder="big", is_signed=False):
71677167
"""
7168-
Return an array of bytes representing an integer. Internally relies
7169-
on the python ``int.to_bytes()`` method.
7168+
Return an array of bytes representing an integer.
7169+
7170+
Internally relies on the python ``int.to_bytes()`` method.
71707171
71717172
INPUT:
71727173
@@ -7184,8 +7185,9 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement):
71847185
71857186
- Bytes representing ``self``
71867187
7187-
TODO: should we convert straight from the gmp type in cython? This is definitely
7188-
possible but I'm not sure the cleanest way to do this
7188+
.. TODO:: It should be possible to convert straight from the gmp type in cython.
7189+
This could be significantly faster, but I am unsure of the fastest and cleanest
7190+
way to do this.
71897191
71907192
EXAMPLES::
71917193

src/sage/rings/integer_ring.pyx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,8 +1576,9 @@ cdef class IntegerRing_class(PrincipalIdealDomain):
15761576

15771577
def from_bytes(self, input_bytes, byteorder="big", is_signed=False):
15781578
"""
1579-
Return the integer represented by the given array of bytes. Internally relies
1580-
on the python ``int.from_bytes()`` method.
1579+
Return the integer represented by the given array of bytes.
1580+
1581+
Internally relies on the python ``int.from_bytes()`` method.
15811582
15821583
INPUT:
15831584

0 commit comments

Comments
 (0)