diff -up src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx.orig src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx --- src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx 2021-08-26 13:02:37.375205416 -0600 @@ -229,7 +229,7 @@ cdef class FreeAlgebraElement_letterplac return '0' def _latex_(self): - """ + r""" TESTS:: sage: K. = GF(25) diff -up src/sage/algebras/letterplace/free_algebra_letterplace.pyx.orig src/sage/algebras/letterplace/free_algebra_letterplace.pyx --- src/sage/algebras/letterplace/free_algebra_letterplace.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/algebras/letterplace/free_algebra_letterplace.pyx 2021-08-26 13:02:37.376205417 -0600 @@ -618,7 +618,7 @@ cdef class FreeAlgebra_letterplace(Algeb # Auxiliar methods cdef str exponents_to_latex(self, E): - """ + r""" This auxiliary method is used for the representation of elements of this free algebra as a latex string. EXAMPLES:: diff -up src/sage/coding/binary_code.pyx.orig src/sage/coding/binary_code.pyx --- src/sage/coding/binary_code.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/coding/binary_code.pyx 2021-08-26 13:02:37.377205418 -0600 @@ -517,7 +517,7 @@ cdef codeword permute_word_by_wp(WordPer return image def test_expand_to_ortho_basis(B=None): - """ + r""" This function is written in pure C for speed, and is tested from this function. diff -up src/sage/coding/codecan/codecan.pyx.orig src/sage/coding/codecan/codecan.pyx --- src/sage/coding/codecan/codecan.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/coding/codecan/codecan.pyx 2021-08-26 13:02:37.378205419 -0600 @@ -369,7 +369,7 @@ cdef class InnerGroup: return self.transporter def __repr__(self): - """ + r""" EXAMPLES:: sage: from sage.coding.codecan.codecan import InnerGroup @@ -378,7 +378,7 @@ cdef class InnerGroup: frobenius power = 1 and partition = 0 -> 0 1 -> 1 2 -> 2 3 -> 3 4 -> 4 5 -> 5 6 -> 6 7 -> 7 8 -> 8 9 -> 9 """ - return "Subgroup of (GL(k,q) times \GF{q}^n ) rtimes Aut(\GF{q}) " + \ + return r"Subgroup of (GL(k,q) times \GF{q}^n ) rtimes Aut(\GF{q}) " + \ "with rank = %s, frobenius power = %s and partition =%s" % (self.rank, self.frob_pow, OP_string(self.row_partition)) diff -up src/sage/combinat/crystals/letters.pyx.orig src/sage/combinat/crystals/letters.pyx --- src/sage/combinat/crystals/letters.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/combinat/crystals/letters.pyx 2021-08-26 13:02:37.379205420 -0600 @@ -558,7 +558,7 @@ cdef class EmptyLetter(Element): return 'E' def _latex_(self): - """ + r""" Return a latex representation of ``self``. EXAMPLES:: diff -up src/sage/combinat/crystals/tensor_product_element.pyx.orig src/sage/combinat/crystals/tensor_product_element.pyx --- src/sage/combinat/crystals/tensor_product_element.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/combinat/crystals/tensor_product_element.pyx 2021-08-26 13:02:37.380205422 -0600 @@ -145,8 +145,8 @@ cdef class TensorProductOfCrystalsElemen """ from sage.misc.latex import latex if self._parent.options.convention == "Kashiwara": - return ' \otimes '.join(latex(c) for c in reversed(self)) - return ' \otimes '.join(latex(c) for c in self) + return r' \otimes '.join(latex(c) for c in reversed(self)) + return r' \otimes '.join(latex(c) for c in self) def _ascii_art_(self): """ @@ -1314,7 +1314,7 @@ cdef class CrystalOfBKKTableauxElement(T return repr(self.to_tableau()) def _repr_diagram(self): - """ + r""" Return a string representation of ``self`` as a diagram. EXAMPLES:: diff -up src/sage/combinat/posets/poset_examples.py.orig src/sage/combinat/posets/poset_examples.py --- src/sage/combinat/posets/poset_examples.py.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/combinat/posets/poset_examples.py 2021-08-27 08:10:25.616669419 -0600 @@ -155,7 +155,7 @@ class Posets(metaclass=ClasscallMetaclas @staticmethod def BooleanLattice(n, facade=None, use_subsets=False): - """ + r""" Return the Boolean lattice containing `2^n` elements. - ``n`` -- integer; number of elements will be `2^n` diff -up src/sage/graphs/matchpoly.pyx.orig src/sage/graphs/matchpoly.pyx --- src/sage/graphs/matchpoly.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/graphs/matchpoly.pyx 2021-08-26 13:02:41.117209797 -0600 @@ -50,7 +50,7 @@ x = polygen(ZZ, 'x') def matching_polynomial(G, complement=True, name=None): - """ + r""" Computes the matching polynomial of the graph `G`. If `p(G, k)` denotes the number of `k`-matchings (matchings with `k` edges) diff -up src/sage/graphs/strongly_regular_db.pyx.orig src/sage/graphs/strongly_regular_db.pyx --- src/sage/graphs/strongly_regular_db.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/graphs/strongly_regular_db.pyx 2021-08-26 13:02:41.118209798 -0600 @@ -2397,7 +2397,7 @@ def strongly_regular_from_two_intersecti A set of points in the projective geometry `PG(k,q)` is said to be a 2-intersection set if it intersects every hyperplane in either `h_1` or - `h_2` points, where `h_1,h_2\in \\NN`. + `h_2` points, where `h_1,h_2\in \NN`. From a 2-intersection set `S` can be defined a strongly-regular graph in the following way: diff -up src/sage/groups/group.pyx.orig src/sage/groups/group.pyx --- src/sage/groups/group.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/groups/group.pyx 2021-08-26 13:02:41.119209799 -0600 @@ -51,7 +51,7 @@ def is_Group(x): cdef class Group(Parent): - """ + r""" Base class for all groups TESTS:: @@ -190,7 +190,7 @@ cdef class Group(Parent): return self.order() != infinity def is_multiplicative(self): - """ + r""" Returns True if the group operation is given by \* (rather than +). diff -up src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx.orig src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx --- src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx 2021-08-26 13:02:41.119209799 -0600 @@ -913,7 +913,7 @@ cdef class PartitionRefinement_generic: "\\begin{tikzpicture}\n" + "\\tikzset{level distance=3cm, edge from parent/.style=" + "{draw, edge from parent path={(\\tikzparentnode.south) -- (\\tikzchildnode.north)}}}\n" + - "\Tree") + "\\Tree") self._latex_debug_string += "[." self._latex_act_node() diff -up src/sage/groups/perm_gps/partn_ref/data_structures.pyx.orig src/sage/groups/perm_gps/partn_ref/data_structures.pyx --- src/sage/groups/perm_gps/partn_ref/data_structures.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/groups/perm_gps/partn_ref/data_structures.pyx 2021-08-26 13:02:41.120209801 -0600 @@ -828,11 +828,11 @@ cdef SC_print_level(StabilizerChain *SC, print('| labels {}'.format([SC.labels [level][i] for i from 0 <= i < n])) print('|') print('| generators {}'.format([[SC.generators [level][n*i + j] for j from 0 <= j < n] for i from 0 <= i < SC.num_gens[level]])) - print('\ inverses {}'.format([[SC.gen_inverses[level][n*i + j] for j from 0 <= j < n] for i from 0 <= i < SC.num_gens[level]])) + print('\\ inverses {}'.format([[SC.gen_inverses[level][n*i + j] for j from 0 <= j < n] for i from 0 <= i < SC.num_gens[level]])) else: print('/ level {}'.format(level)) print('|') - print('\ base_size {}'.format(SC.base_size)) + print('\\ base_size {}'.format(SC.base_size)) cdef StabilizerChain *SC_new_base(StabilizerChain *SC, int *base, int base_len): """ diff -up src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx.orig src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx --- src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx 2021-08-26 13:02:41.121209802 -0600 @@ -105,7 +105,7 @@ cdef class LinearBinaryCodeStruct(Binary self.ith_word = &ith_word_linear def run(self, partition=None): - """ + r""" Perform the canonical labeling and automorphism group computation, storing results to self. @@ -607,7 +607,7 @@ cdef int ith_word_nonlinear(BinaryCodeSt return 0 cdef int refine_by_bip_degree(PartitionStack *col_ps, void *S, int *cells_to_refine_by, int ctrb_len): - """ + r""" Refines the input partition by checking degrees of vertices to the given cells in the associated bipartite graph (vertices split into columns and words). @@ -731,7 +731,7 @@ cdef int refine_by_bip_degree(PartitionS return invariant cdef int compare_linear_codes(int *gamma_1, int *gamma_2, void *S1, void *S2, int degree): - """ + r""" Compare gamma_1(S1) and gamma_2(S2). Return return -1 if gamma_1(S1) < gamma_2(S2), 0 if gamma_1(S1) == gamma_2(S2), @@ -804,7 +804,7 @@ cdef int compare_linear_codes(int *gamma return 0 cdef int compare_nonlinear_codes(int *gamma_1, int *gamma_2, void *S1, void *S2, int degree): - """ + r""" Compare gamma_1(S1) and gamma_2(S2). Return return -1 if gamma_1(S1) < gamma_2(S2), 0 if gamma_1(S1) == gamma_2(S2), diff -up src/sage/groups/perm_gps/permgroup_element.pyx.orig src/sage/groups/perm_gps/permgroup_element.pyx --- src/sage/groups/perm_gps/permgroup_element.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/groups/perm_gps/permgroup_element.pyx 2021-08-26 13:02:41.122209803 -0600 @@ -1175,7 +1175,7 @@ cdef class PermutationGroupElement(Multi return result cpdef _act_on_(self, x, bint self_on_left): - """ + r""" Return the result of the action of ``self`` on ``x``. For example, if ``x=f(z)`` is a polynomial, then this function returns @@ -1619,7 +1619,7 @@ cdef class PermutationGroupElement(Multi return ~self def sign(self): - """ + r""" Returns the sign of self, which is `(-1)^{s}`, where `s` is the number of swaps. diff -up src/sage/libs/eclib/newforms.pyx.orig src/sage/libs/eclib/newforms.pyx --- src/sage/libs/eclib/newforms.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/libs/eclib/newforms.pyx 2021-08-26 13:02:41.122209803 -0600 @@ -22,7 +22,7 @@ from sage.modular.all import Cusp cdef class ECModularSymbol: - """ + r""" Modular symbol associated with an elliptic curve, using John Cremona's newforms class. EXAMPLES:: diff -up src/sage/libs/fes.pyx.orig src/sage/libs/fes.pyx --- src/sage/libs/fes.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/libs/fes.pyx 2021-08-26 13:02:41.123209804 -0600 @@ -292,7 +292,7 @@ def find_coordinate_change(As, max_tries def prepare_polynomials(f): - """ + r""" Finds a linear combination of the equations that is faster to solve by FES INPUT: diff -up src/sage/libs/ntl/ntl_GF2E.pyx.orig src/sage/libs/ntl/ntl_GF2E.pyx --- src/sage/libs/ntl/ntl_GF2E.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/libs/ntl/ntl_GF2E.pyx 2021-08-26 13:02:41.123209804 -0600 @@ -73,7 +73,7 @@ def ntl_GF2E_random(ntl_GF2EContext_clas cdef class ntl_GF2E(object): r""" - The \\class{GF2E} represents a finite extension field over GF(2) + The \class{GF2E} represents a finite extension field over GF(2) using NTL. Elements are represented as polynomials over GF(2) modulo a modulus. @@ -439,7 +439,7 @@ cdef class ntl_GF2E(object): return l def _sage_(ntl_GF2E self, k=None): - """ + r""" Returns a \class{FiniteFieldElement} representation of this element. If a \class{FiniteField} k is provided it is constructed in this field if possible. A \class{FiniteField} diff -up src/sage/libs/ntl/ntl_GF2X.pyx.orig src/sage/libs/ntl/ntl_GF2X.pyx --- src/sage/libs/ntl/ntl_GF2X.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/libs/ntl/ntl_GF2X.pyx 2021-08-26 13:02:41.124209805 -0600 @@ -484,7 +484,7 @@ cdef class ntl_GF2X(object): return [self[i] for i in range(GF2X_deg(self.x)+1)] def bin(ntl_GF2X self): - """ + r""" Returns binary representation of this element. It is the same as setting \code{ntl.GF2XHexOutput(False)} and representing this element afterwards. However it should be @@ -507,7 +507,7 @@ cdef class ntl_GF2X(object): return s def hex(ntl_GF2X self): - """ + r""" Return an hexadecimal representation of this element. It is the same as setting \code{ntl.GF2XHexOutput(True)} and diff -up src/sage/libs/ntl/ntl_mat_GF2E.pyx.orig src/sage/libs/ntl/ntl_mat_GF2E.pyx --- src/sage/libs/ntl/ntl_mat_GF2E.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/libs/ntl/ntl_mat_GF2E.pyx 2021-08-26 13:02:41.124209805 -0600 @@ -181,7 +181,7 @@ cdef class ntl_mat_GF2E(object): return unpickle_class_args, (ntl_mat_GF2E, (self.modulus_context(), self.x.NumRows(), self.x.NumCols(), self.list())) def __repr__(self): - """ + r""" Return the string representation of self. EXAMPLES:: @@ -446,7 +446,7 @@ cdef class ntl_mat_GF2E(object): return r def gauss(self,ncols=-1): - """ + r""" Performs unitary row operations so as to bring this matrix into row echelon form. If the optional argument \code{ncols} is supplied, stops when first ncols columns are in echelon diff -up src/sage/libs/ntl/ntl_mat_GF2.pyx.orig src/sage/libs/ntl/ntl_mat_GF2.pyx --- src/sage/libs/ntl/ntl_mat_GF2.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/libs/ntl/ntl_mat_GF2.pyx 2021-08-26 13:02:41.125209807 -0600 @@ -5,7 +5,7 @@ # distutils: extra_link_args = NTL_LIBEXTRA # distutils: language = c++ -""" +r""" Matrices over the $\GF{2}$ via NTL This class is only provided to have a complete NTL interface and for @@ -376,7 +376,7 @@ cdef class ntl_mat_GF2(object): return r def gauss(self,ncols=-1): - """ + r""" Performs unitary row operations so as to bring this matrix into row echelon form (not reduced!). If the optional argument \code{ncols} is supplied, stops when first ncols @@ -497,7 +497,7 @@ cdef class ntl_mat_GF2(object): return r def __invert__(self): - """ + r""" Return $X = A^{-1}$; an error is raised if A is singular. EXAMPLES:: diff -up src/sage/libs/ntl/ntl_mat_ZZ.pyx.orig src/sage/libs/ntl/ntl_mat_ZZ.pyx --- src/sage/libs/ntl/ntl_mat_ZZ.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/libs/ntl/ntl_mat_ZZ.pyx 2021-08-26 13:02:41.126209808 -0600 @@ -73,7 +73,7 @@ cdef class ntl_mat_ZZ(object): The \class{mat_ZZ} class implements arithmetic with matrices over $\Z$. """ def __init__(self, nrows=0, ncols=0, v=None): - """ + r""" The \class{mat_ZZ} class implements arithmetic with matrices over $\Z$. EXAMPLES:: @@ -129,7 +129,7 @@ cdef class ntl_mat_ZZ(object): return unpickle_class_args, (ntl_mat_ZZ, (self.__nrows, self.__ncols, self.list())) def __repr__(self): - """ + r""" Return the string representation of self. EXAMPLES:: diff -up src/sage/libs/ntl/ntl_ZZ_pEX.pyx.orig src/sage/libs/ntl/ntl_ZZ_pEX.pyx --- src/sage/libs/ntl/ntl_ZZ_pEX.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/libs/ntl/ntl_ZZ_pEX.pyx 2021-08-26 13:02:41.127209809 -0600 @@ -5,7 +5,7 @@ # distutils: extra_link_args = NTL_LIBEXTRA # distutils: language = c++ -""" +r""" Wrapper for NTL's polynomials over finite ring extensions of $\Z / p\Z.$ AUTHORS: diff -up src/sage/libs/ntl/ntl_ZZX.pyx.orig src/sage/libs/ntl/ntl_ZZX.pyx --- src/sage/libs/ntl/ntl_ZZX.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/libs/ntl/ntl_ZZX.pyx 2021-08-26 13:02:41.127209809 -0600 @@ -692,7 +692,7 @@ cdef class ntl_ZZX(object): return (self*other).quo_rem(g)[0] def xgcd(self, ntl_ZZX other, proof=None): - """ + r""" If self and other are coprime over the rationals, return r, s, t such that r = s*self + t*other. Otherwise return 0. This is \emph{not} the same as the \sage function on polynomials diff -up src/sage/libs/pynac/pynac.pyx.orig src/sage/libs/pynac/pynac.pyx --- src/sage/libs/pynac/pynac.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/libs/pynac/pynac.pyx 2021-08-26 13:02:41.128209810 -0600 @@ -385,7 +385,7 @@ cdef stdstring* string_from_pystr(py_str return new stdstring(s) cdef stdstring* py_latex_variable(var_name): - """ + r""" Returns a c++ string containing the latex representation of the given variable name. @@ -414,7 +414,7 @@ cdef stdstring* py_latex_variable(var_na return string_from_pystr(py_vlatex) def py_latex_variable_for_doctests(x): - """ + r""" Internal function used so we can doctest a certain cdef'd method. EXAMPLES:: @@ -703,7 +703,7 @@ cdef stdstring* py_latex_fderivative(uns operator_string=r"\frac{\partial^{%s}}{%s}"%(len(params),''.join(diff_args)) py_res = operator_string+py_latex_function_pystring(id,args,False) else: - ostr = ''.join(['\mathrm{D}_{',', '.join([repr(int(x)) for x in params]), '}']) + ostr = ''.join([r'\mathrm{D}_{',', '.join([repr(int(x)) for x in params]), '}']) fstr = py_latex_function_pystring(id, args, True) py_res = ostr + fstr return string_from_pystr(py_res) diff -up src/sage/libs/singular/polynomial.pyx.orig src/sage/libs/singular/polynomial.pyx --- src/sage/libs/singular/polynomial.pyx.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/libs/singular/polynomial.pyx 2021-08-26 13:02:41.129209811 -0600 @@ -22,7 +22,7 @@ cdef extern from *: # hack to get at cyt int unlikely(int) import re -plusminus_pattern = re.compile("([^\(^])([\+\-])") +plusminus_pattern = re.compile(r"([^\(^])([\+\-])") from sage.cpython.string cimport bytes_to_str, str_to_bytes diff -up src/sage/libs/symmetrica/sc.pxi.orig src/sage/libs/symmetrica/sc.pxi --- src/sage/libs/symmetrica/sc.pxi.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/libs/symmetrica/sc.pxi 2021-08-26 13:02:41.129209811 -0600 @@ -103,7 +103,7 @@ def charvalue_symmetrica(irred, cls, tab def kranztafel_symmetrica(a, b): - """ + r""" you enter the INTEGER objects, say a and b, and res becomes a MATRIX object, the charactertable of S_b \wr S_a, co becomes a VECTOR object of classorders and cl becomes a VECTOR object of diff -up src/sage/manifolds/chart.py.orig src/sage/manifolds/chart.py --- src/sage/manifolds/chart.py.orig 2021-08-22 02:44:33.000000000 -0600 +++ src/sage/manifolds/chart.py 2021-08-27 08:12:45.706133989 -0600 @@ -2059,7 +2059,7 @@ class RealChart(Chart): return self._bounds[i-self._sindex] def codomain(self): - """ + r""" Return the codomain of ``self`` as a set. EXAMPLES:: diff -up src/sage/matrix/matrix0.pyx.orig src/sage/matrix/matrix0.pyx --- src/sage/matrix/matrix0.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/matrix/matrix0.pyx 2021-08-26 13:04:22.095328354 -0600 @@ -2292,7 +2292,7 @@ cdef class Matrix(sage.structure.element # Functions ################################################### def act_on_polynomial(self, f): - """ + r""" Return the polynomial f(self\*x). INPUT: @@ -2358,7 +2358,7 @@ cdef class Matrix(sage.structure.element # Arithmetic ################################################### def commutator(self, other): - """ + r""" Return the commutator self\*other - other\*self. EXAMPLES:: @@ -4958,7 +4958,7 @@ cdef class Matrix(sage.structure.element # Arithmetic ################################################### cdef _vector_times_matrix_(self, Vector v): - """ + r""" Return the vector times matrix product. INPUT: diff -up src/sage/matrix/matrix2.pyx.orig src/sage/matrix/matrix2.pyx --- src/sage/matrix/matrix2.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/matrix/matrix2.pyx 2021-08-26 13:02:41.138209822 -0600 @@ -9630,7 +9630,7 @@ cdef class Matrix(Matrix1): return img def density(self): - """ + r""" Return the density of the matrix. By density we understand the ratio of the number of nonzero diff -up src/sage/matrix/matrix_integer_dense.pyx.orig src/sage/matrix/matrix_integer_dense.pyx --- src/sage/matrix/matrix_integer_dense.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/matrix/matrix_integer_dense.pyx 2021-08-26 13:02:41.140209824 -0600 @@ -746,7 +746,7 @@ cdef class Matrix_integer_dense(Matrix_d return ans def _multiply_classical(self, Matrix_integer_dense right): - """ + r""" EXAMPLES:: sage: n = 3 diff -up src/sage/matrix/matrix_modn_dense_template.pxi.orig src/sage/matrix/matrix_modn_dense_template.pxi --- src/sage/matrix/matrix_modn_dense_template.pxi.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/matrix/matrix_modn_dense_template.pxi 2021-08-26 13:02:41.141209825 -0600 @@ -635,7 +635,7 @@ cdef class Matrix_modn_dense_template(Ma return (word_size, little_endian, s), 10 def _unpickle(self, data, int version): - """ + r""" TESTS: Test for char-sized modulus:: @@ -2247,7 +2247,7 @@ cdef class Matrix_modn_dense_template(Ma return Matrix_dense.determinant(self) cdef xgcd_eliminate(self, celement * row1, celement* row2, Py_ssize_t start_col): - """ + r""" Reduces ``row1`` and ``row2`` by a unimodular transformation using the xgcd relation between their first coefficients ``a`` and ``b``. diff -up src/sage/matrix/matrix_polynomial_dense.pyx.orig src/sage/matrix/matrix_polynomial_dense.pyx --- src/sage/matrix/matrix_polynomial_dense.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/matrix/matrix_polynomial_dense.pyx 2021-08-26 13:02:41.142209826 -0600 @@ -49,16 +49,16 @@ cdef class Matrix_polynomial_dense(Matri commonly used in the literature. - Working column-wise: each column of the matrix is a vector in the basis; - then, a $\\Bold{K}[x]$-submodule of $\\Bold{K}[x]^{m}$ of rank $n$ is - represented by an $m \\times n$ matrix, whose columns span the module - (via $\\Bold{K}[x]$-linear combinations). This matrix has full rank, - and $n \\leq m$. + then, a $\Bold{K}[x]$-submodule of $\Bold{K}[x]^{m}$ of rank $n$ is + represented by an $m \times n$ matrix, whose columns span the module + (via $\Bold{K}[x]$-linear combinations). This matrix has full rank, + and $n \leq m$. - Working row-wise: each row of the matrix is a vector in the basis; then, - a $\\Bold{K}[x]$-submodule of $\\Bold{K}[x]^{n}$ of rank $m$ is - represented by an $m \\times n$ matrix, whose rows span the module (via - $\\Bold{K}[x]$-linear combinations). This matrix has full rank, and $m - \\leq n$. + a $\Bold{K}[x]$-submodule of $\Bold{K}[x]^{n}$ of rank $m$ is + represented by an $m \times n$ matrix, whose rows span the module (via + $\Bold{K}[x]$-linear combinations). This matrix has full rank, and $m + \leq n$. For the rest of this class description, we assume that one is working row-wise. For a given such module, all its bases are equivalent under diff -up src/sage/matrix/matrix_rational_dense.pyx.orig src/sage/matrix/matrix_rational_dense.pyx --- src/sage/matrix/matrix_rational_dense.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/matrix/matrix_rational_dense.pyx 2021-08-26 13:02:41.143209828 -0600 @@ -507,7 +507,7 @@ cdef class Matrix_rational_dense(Matrix_ return rich_to_bool(op, 0) cdef _vector_times_matrix_(self, Vector v): - """ + r""" Returns the vector times matrix product. INPUT: @@ -920,7 +920,7 @@ cdef class Matrix_rational_dense(Matrix_ return 0 def _clear_denom(self): - """ + r""" INPUT: @@ -1187,7 +1187,7 @@ cdef class Matrix_rational_dense(Matrix_ return ans def _multiply_over_integers(self, Matrix_rational_dense right, algorithm='default'): - """ + r""" Multiply this matrix by right using a multimodular algorithm and return the result. diff -up src/sage/matroids/basis_exchange_matroid.pyx.orig src/sage/matroids/basis_exchange_matroid.pyx --- src/sage/matroids/basis_exchange_matroid.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/matroids/basis_exchange_matroid.pyx 2021-08-26 13:02:41.144209829 -0600 @@ -2115,7 +2115,7 @@ cdef class BasisExchangeMatroid(Matroid) return EQ[0] cpdef _is_isomorphism(self, other, morphism): - """ + r""" Version of is_isomorphism() that does no type checking. INPUT: diff -up src/sage/matroids/linear_matroid.pyx.orig src/sage/matroids/linear_matroid.pyx --- src/sage/matroids/linear_matroid.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/matroids/linear_matroid.pyx 2021-08-26 13:02:41.147209832 -0600 @@ -804,7 +804,7 @@ cdef class LinearMatroid(BasisExchangeMa # (field) isomorphism cpdef bint _is_field_isomorphism(self, LinearMatroid other, morphism): # not safe if self == other - """ + r""" Version of :meth:`` that does no type checking. @@ -970,7 +970,7 @@ cdef class LinearMatroid(BasisExchangeMa return self._is_field_isomorphism(other, morphism) cpdef is_field_isomorphism(self, other, morphism): - """ + r""" Test if a provided morphism induces a bijection between represented matroids. diff -up src/sage/matroids/matroid.pyx.orig src/sage/matroids/matroid.pyx --- src/sage/matroids/matroid.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/matroids/matroid.pyx 2021-08-26 13:02:41.148209833 -0600 @@ -3076,7 +3076,7 @@ cdef class Matroid(SageObject): return Polyhedron(vertices) def independence_matroid_polytope(self): - """ + r""" Return the independence matroid polytope of ``self``. This is defined as the convex hull of the vertices @@ -3356,7 +3356,7 @@ cdef class Matroid(SageObject): return self._is_isomorphism(other, morphism) cpdef is_isomorphism(self, other, morphism): - """ + r""" Test if a provided morphism induces a matroid isomorphism. A *morphism* is a map from the groundset of ``self`` to the groundset @@ -3479,7 +3479,7 @@ cdef class Matroid(SageObject): return self._is_isomorphism(other, mf) cpdef _is_isomorphism(self, other, morphism): - """ + r""" Version of is_isomorphism() that does no type checking. INPUT: @@ -4242,7 +4242,7 @@ cdef class Matroid(SageObject): return self.dual().extension(element, subsets).dual() cpdef modular_cut(self, subsets): - """ + r""" Compute the modular cut generated by ``subsets``. A *modular cut* is a collection `C` of flats such that @@ -4643,7 +4643,7 @@ cdef class Matroid(SageObject): return True cpdef is_cosimple(self): - """ + r""" Test if the matroid is cosimple. A matroid is *cosimple* if it contains no cocircuits of length 1 or 2. @@ -7409,7 +7409,7 @@ cdef class Matroid(SageObject): return A cpdef tutte_polynomial(self, x=None, y=None): - """ + r""" Return the Tutte polynomial of the matroid. The *Tutte polynomial* of a matroid is the polynomial diff -up src/sage/misc/cachefunc.pyx.orig src/sage/misc/cachefunc.pyx --- src/sage/misc/cachefunc.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/misc/cachefunc.pyx 2021-08-26 13:02:41.149209835 -0600 @@ -835,7 +835,7 @@ cdef class CachedFunction(object): ## forward other questions to the cached function. def _instancedoc_(self): - """ + r""" Provide documentation for the cached function. A cached function shall inherit the documentation diff -up src/sage/misc/sageinspect.py.orig src/sage/misc/sageinspect.py --- src/sage/misc/sageinspect.py.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/misc/sageinspect.py 2021-08-26 13:02:41.150209836 -0600 @@ -848,7 +848,7 @@ class SageArgSpecVisitor(ast.NodeVisitor def _grep_first_pair_of_parentheses(s): - """ + r""" Return the first matching pair of parentheses in a code string. INPUT: @@ -903,7 +903,7 @@ def _grep_first_pair_of_parentheses(s): def _split_syntactical_unit(s): - """ + r""" Split off a sub-expression from the start of a given string. INPUT: diff -up src/sage/modular/arithgroup/arithgroup_element.pyx.orig src/sage/modular/arithgroup/arithgroup_element.pyx --- src/sage/modular/arithgroup/arithgroup_element.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/modular/arithgroup/arithgroup_element.pyx 2021-08-26 13:02:41.150209836 -0600 @@ -194,7 +194,7 @@ cdef class ArithmeticSubgroupElement(Mul return richcmp(self.__x, right.__x, op) def __nonzero__(self): - """ + r""" Return ``True``, since the ``self`` lives in SL(2,\Z), which does not contain the zero matrix. diff -up src/sage/modular/arithgroup/farey_symbol.pyx.orig src/sage/modular/arithgroup/farey_symbol.pyx --- src/sage/modular/arithgroup/farey_symbol.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/modular/arithgroup/farey_symbol.pyx 2021-08-26 13:02:41.151209837 -0600 @@ -614,7 +614,7 @@ cdef class Farey: if forced_format == 'plain': # output not using xymatrix s = r'\left( -\infty' - a = [x._latex_() for x in self.fractions()] + ['\infty'] + a = [x._latex_() for x in self.fractions()] + [r'\infty'] b = self.pairings() for i in xrange(len(a)): u = b[i] diff -up src/sage/modular/modsym/heilbronn.pyx.orig src/sage/modular/modsym/heilbronn.pyx --- src/sage/modular/modsym/heilbronn.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/modular/modsym/heilbronn.pyx 2021-08-26 13:02:41.151209837 -0600 @@ -211,7 +211,7 @@ cdef class Heilbronn: sig_off() cdef apply_to_polypart(self, fmpz_poly_t* ans, int i, int k): - """ + r""" INPUT: - ``ans`` - fmpz_poly_t\*; pre-allocated an diff -up src/sage/modules/free_module_element.pyx.orig src/sage/modules/free_module_element.pyx --- src/sage/modules/free_module_element.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/modules/free_module_element.pyx 2021-08-26 13:02:41.153209839 -0600 @@ -2373,7 +2373,7 @@ cdef class FreeModuleElement(Vector): def plot_step(self, xmin=0, xmax=1, eps=None, res=None, connect=True, **kwds): - """ + r""" INPUT: - ``xmin`` - (default: 0) start x position to start @@ -3708,7 +3708,7 @@ cdef class FreeModuleElement(Vector): from sage.misc.latex import latex vector_delimiters = latex.vector_delimiters() s = '\\left' + vector_delimiters[0] - s += ',\,'.join(latex(a) for a in self.list()) + s += ',\\,'.join(latex(a) for a in self.list()) return s + '\\right' + vector_delimiters[1] def dense_vector(self): diff -up src/sage/numerical/backends/generic_backend.pyx.orig src/sage/numerical/backends/generic_backend.pyx --- src/sage/numerical/backends/generic_backend.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/numerical/backends/generic_backend.pyx 2021-08-26 13:02:41.153209839 -0600 @@ -1376,7 +1376,7 @@ cdef class GenericBackend: raise NotImplementedError() cpdef bint is_variable_basic(self, int index): - """ + r""" Test whether the given variable is basic. This assumes that the problem has been solved with the simplex method @@ -1406,7 +1406,7 @@ cdef class GenericBackend: raise NotImplementedError() cpdef bint is_variable_nonbasic_at_lower_bound(self, int index): - """ + r""" Test whether the given variable is nonbasic at lower bound. This assumes that the problem has been solved with the simplex method @@ -1436,7 +1436,7 @@ cdef class GenericBackend: raise NotImplementedError() cpdef bint is_slack_variable_basic(self, int index): - """ + r""" Test whether the slack variable of the given row is basic. This assumes that the problem has been solved with the simplex method @@ -1466,7 +1466,7 @@ cdef class GenericBackend: raise NotImplementedError() cpdef bint is_slack_variable_nonbasic_at_lower_bound(self, int index): - """ + r""" Test whether the given variable is nonbasic at lower bound. This assumes that the problem has been solved with the simplex method diff -up src/sage/numerical/backends/glpk_backend.pyx.orig src/sage/numerical/backends/glpk_backend.pyx --- src/sage/numerical/backends/glpk_backend.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/numerical/backends/glpk_backend.pyx 2021-08-26 13:02:41.154209841 -0600 @@ -2320,7 +2320,7 @@ cdef class GLPKBackend(GenericBackend): cpdef bint is_variable_basic(self, int index): - """ + r""" Test whether the given variable is basic. This assumes that the problem has been solved with the simplex method @@ -2351,7 +2351,7 @@ cdef class GLPKBackend(GenericBackend): return self.get_col_stat(index) == GLP_BS cpdef bint is_variable_nonbasic_at_lower_bound(self, int index): - """ + r""" Test whether the given variable is nonbasic at lower bound. This assumes that the problem has been solved with the simplex method and a basis is available. Otherwise an exception will be raised. @@ -2381,7 +2381,7 @@ cdef class GLPKBackend(GenericBackend): return self.get_col_stat(index) == GLP_NL cpdef bint is_slack_variable_basic(self, int index): - """ + r""" Test whether the slack variable of the given row is basic. This assumes that the problem has been solved with the simplex method @@ -2412,7 +2412,7 @@ cdef class GLPKBackend(GenericBackend): return self.get_row_stat(index) == GLP_BS cpdef bint is_slack_variable_nonbasic_at_lower_bound(self, int index): - """ + r""" Test whether the slack variable of the given row is nonbasic at lower bound. This assumes that the problem has been solved with the simplex method diff -up src/sage/numerical/backends/interactivelp_backend.pyx.orig src/sage/numerical/backends/interactivelp_backend.pyx --- src/sage/numerical/backends/interactivelp_backend.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/numerical/backends/interactivelp_backend.pyx 2021-08-26 13:02:41.154209841 -0600 @@ -1063,7 +1063,7 @@ cdef class InteractiveLPBackend: problem_type, ring, objective_constant_term=d) cpdef bint is_variable_basic(self, int index): - """ + r""" Test whether the given variable is basic. This assumes that the problem has been solved with the simplex method @@ -1093,7 +1093,7 @@ cdef class InteractiveLPBackend: return self.lp_std_form.decision_variables()[index] in self.final_dictionary.basic_variables() cpdef bint is_variable_nonbasic_at_lower_bound(self, int index): - """ + r""" Test whether the given variable is nonbasic at lower bound. This assumes that the problem has been solved with the simplex method @@ -1123,7 +1123,7 @@ cdef class InteractiveLPBackend: return self.lp_std_form.decision_variables()[index] in self.final_dictionary.nonbasic_variables() cpdef bint is_slack_variable_basic(self, int index): - """ + r""" Test whether the slack variable of the given row is basic. This assumes that the problem has been solved with the simplex method @@ -1153,7 +1153,7 @@ cdef class InteractiveLPBackend: return self.lp_std_form.slack_variables()[index] in self.final_dictionary.basic_variables() cpdef bint is_slack_variable_nonbasic_at_lower_bound(self, int index): - """ + r""" Test whether the given variable is nonbasic at lower bound. This assumes that the problem has been solved with the simplex method @@ -1185,7 +1185,7 @@ cdef class InteractiveLPBackend: cpdef dictionary(self): # Proposed addition to the general interface, # which would for other solvers return backend dictionaries (#18804) - """ + r""" Return a dictionary representing the current basis. EXAMPLES:: @@ -1220,7 +1220,7 @@ cdef class InteractiveLPBackend: cpdef interactive_lp_problem(self): - """ + r""" Return the :class:`InteractiveLPProblem` object associated with this backend. EXAMPLES:: diff -up src/sage/quivers/algebra_elements.pyx.orig src/sage/quivers/algebra_elements.pyx --- src/sage/quivers/algebra_elements.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/quivers/algebra_elements.pyx 2021-08-26 13:02:41.155209842 -0600 @@ -280,7 +280,7 @@ cdef class PathAlgebraElement(RingElemen ) def _latex_(self): - """ + r""" Latex string representation. EXAMPLES:: diff -up src/sage/rings/bernoulli_mod_p.pyx.orig src/sage/rings/bernoulli_mod_p.pyx --- src/sage/rings/bernoulli_mod_p.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/rings/bernoulli_mod_p.pyx 2021-08-26 13:02:41.155209842 -0600 @@ -41,7 +41,7 @@ from sage.rings.bernmm import bernmm_ber def verify_bernoulli_mod_p(data): - """ + r""" Computes checksum for Bernoulli numbers. It checks the identity diff -up src/sage/rings/complex_interval.pyx.orig src/sage/rings/complex_interval.pyx --- src/sage/rings/complex_interval.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/rings/complex_interval.pyx 2021-08-26 13:02:41.155209842 -0600 @@ -729,7 +729,7 @@ cdef class ComplexIntervalFieldElement(s return x def norm(self): - """ + r""" Return the norm of this complex number. If `c = a + bi` is a complex number, then the norm of `c` is defined as @@ -1111,7 +1111,7 @@ cdef class ComplexIntervalFieldElement(s return x def __invert__(self): - """ + r""" Return the multiplicative inverse of ``self``. EXAMPLES:: diff -up src/sage/rings/complex_mpc.pyx.orig src/sage/rings/complex_mpc.pyx --- src/sage/rings/complex_mpc.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/rings/complex_mpc.pyx 2021-08-26 13:02:41.156209843 -0600 @@ -137,15 +137,15 @@ cdef inline mpfr_rnd_t rnd_im(mpc_rnd_t sign = '[+-]' digit_ten = '[0123456789]' exponent_ten = '[e@]' + sign + '?[0123456789]+' -number_ten = 'inf(?:inity)?|@inf@|nan(?:\([0-9A-Z_]*\))?|@nan@(?:\([0-9A-Z_]*\))?'\ - '|(?:' + digit_ten + '*\.' + digit_ten + '+|' + digit_ten + '+\.?)(?:' + exponent_ten + ')?' -imaginary_ten = 'i(?:\s*\*\s*(?:' + number_ten + '))?|(?:' + number_ten + ')\s*\*\s*i' -complex_ten = '(?P(?P' + sign + ')?\s*(?P' + imaginary_ten + ')' \ - '(\s*(?P' + sign + ')\s*(?P' + number_ten + '))?)' \ +number_ten = r'inf(?:inity)?|@inf@|nan(?:\([0-9A-Z_]*\))?|@nan@(?:\([0-9A-Z_]*\))?'\ + '|(?:' + digit_ten + r'*\.' + digit_ten + '+|' + digit_ten + r'+\.?)(?:' + exponent_ten + ')?' +imaginary_ten = r'i(?:\s*\*\s*(?:' + number_ten + '))?|(?:' + number_ten + r')\s*\*\s*i' +complex_ten = '(?P(?P' + sign + r')?\s*(?P' + imaginary_ten + ')' \ + r'(\s*(?P' + sign + r')\s*(?P' + number_ten + '))?)' \ '|' \ - '(?P(?P' + sign + ')?\s*(?P' + number_ten + ')' \ - '(\s*(?P' + sign + ')\s*(?P' + imaginary_ten + '))?)' -re_complex_ten = re.compile('^\s*(?:' + complex_ten + ')\s*$', re.I) + '(?P(?P' + sign + r')?\s*(?P' + number_ten + ')' \ + r'(\s*(?P' + sign + r')\s*(?P' + imaginary_ten + '))?)' +re_complex_ten = re.compile(r'^\s*(?:' + complex_ten + r')\s*$', re.I) cpdef inline split_complex_string(string, int base=10): """ @@ -185,17 +185,17 @@ cpdef inline split_complex_string(string # Warning: number, imaginary, and complex should be enclosed in parentheses # when used as regexp because of alternatives '|' - number = '@nan@(?:\([0-9A-Z_]*\))?|@inf@|(?:' + digit + '*\.' + digit + '+|' + digit + '+\.?)(?:' + exponent + ')?' + number = r'@nan@(?:\([0-9A-Z_]*\))?|@inf@|(?:' + digit + r'*\.' + digit + '+|' + digit + r'+\.?)(?:' + exponent + ')?' if base <= 10: - number = 'nan(?:\([0-9A-Z_]*\))?|inf(?:inity)?|' + number - imaginary = 'i(?:\s*\*\s*(?:' + number + '))?|(?:' + number + ')\s*\*\s*i' - complex = '(?P(?P' + sign + ')?\s*(?P' + imaginary + ')' \ - '(\s*(?P' + sign + ')\s*(?P' + number + '))?)' \ + number = r'nan(?:\([0-9A-Z_]*\))?|inf(?:inity)?|' + number + imaginary = r'i(?:\s*\*\s*(?:' + number + '))?|(?:' + number + r')\s*\*\s*i' + complex = '(?P(?P' + sign + r')?\s*(?P' + imaginary + ')' \ + r'(\s*(?P' + sign + r')\s*(?P' + number + '))?)' \ '|' \ - '(?P(?P' + sign + ')?\s*(?P' + number + ')' \ - '(\s*(?P' + sign + ')\s*(?P' + imaginary + '))?)' + '(?P(?P' + sign + r')?\s*(?P' + number + ')' \ + r'(\s*(?P' + sign + r')\s*(?P' + imaginary + '))?)' - z = re.match('^\s*(?:' + complex + ')\s*$', string, re.I) + z = re.match(r'^\s*(?:' + complex + r')\s*$', string, re.I) x, y = None, None if z is not None: @@ -207,18 +207,18 @@ cpdef inline split_complex_string(string return None if z.group(prefix + '_re_abs') is not None: - x = z.expand('\g<' + prefix + '_re_abs>') + x = z.expand(r'\g<' + prefix + '_re_abs>') if z.group(prefix + '_re_sign') is not None: - x = z.expand('\g<' + prefix + '_re_sign>') + x + x = z.expand(r'\g<' + prefix + '_re_sign>') + x if z.group(prefix + '_im_abs') is not None: - y = re.search('(?P' + number + ')', z.expand('\g<' + prefix + '_im_abs>'), re.I) + y = re.search('(?P' + number + ')', z.expand(r'\g<' + prefix + '_im_abs>'), re.I) if y is None: y = '1' else: - y = y.expand('\g') + y = y.expand(r'\g') if z.group(prefix + '_im_sign') is not None: - y = z.expand('\g<' + prefix + '_im_sign>') + y + y = z.expand(r'\g<' + prefix + '_im_sign>') + y return x, y @@ -1691,7 +1691,7 @@ cdef class MPComplexNumber(sage.structur return z def cosh(self): - """ + r""" Return the hyperbolic cosine of this complex number: .. MATH:: @@ -1711,7 +1711,7 @@ cdef class MPComplexNumber(sage.structur return z def sinh(self): - """ + r""" Return the hyperbolic sine of this complex number: .. MATH:: @@ -2053,7 +2053,7 @@ cdef class MPComplexNumber(sage.structur return z def exp(self): - """ + r""" Return the exponential of this complex number: .. MATH:: diff -up src/sage/rings/finite_rings/hom_finite_field.pyx.orig src/sage/rings/finite_rings/hom_finite_field.pyx --- src/sage/rings/finite_rings/hom_finite_field.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/rings/finite_rings/hom_finite_field.pyx 2021-08-26 13:02:41.294210004 -0600 @@ -147,7 +147,7 @@ cdef class SectionFiniteFieldHomomorphis def _repr_(self): - """ + r""" Return a string representation of this section. EXAMPLES:: diff -up src/sage/rings/finite_rings/integer_mod.pyx.orig src/sage/rings/finite_rings/integer_mod.pyx --- src/sage/rings/finite_rings/integer_mod.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/rings/finite_rings/integer_mod.pyx 2021-08-26 13:02:41.296210007 -0600 @@ -2179,7 +2179,7 @@ cdef class IntegerMod_gmp(IntegerMod_abs return int(self.lift()) def __pow__(IntegerMod_gmp self, exp, m): # NOTE: m ignored, always use modulus of parent ring - """ + r""" EXAMPLES:: sage: R = Integers(10^10) @@ -3442,7 +3442,7 @@ cdef class IntegerMod_int64(IntegerMod_a return self._new_c(self.ivalue >> (-k)) def __pow__(IntegerMod_int64 self, exp, m): # NOTE: m ignored, always use modulus of parent ring - """ + r""" EXAMPLES:: sage: R = Integers(10) diff -up src/sage/rings/number_field/number_field_element.pyx.orig src/sage/rings/number_field/number_field_element.pyx --- src/sage/rings/number_field/number_field_element.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/rings/number_field/number_field_element.pyx 2021-08-26 13:02:41.297210008 -0600 @@ -490,7 +490,7 @@ cdef class NumberFieldElement(FieldEleme return codomain(f(im_gens[0])) def _latex_(self): - """ + r""" Returns the latex representation for this element. EXAMPLES:: diff -up src/sage/rings/number_field/number_field_morphisms.pyx.orig src/sage/rings/number_field/number_field_morphisms.pyx --- src/sage/rings/number_field/number_field_morphisms.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/rings/number_field/number_field_morphisms.pyx 2021-08-26 13:02:41.298210009 -0600 @@ -340,7 +340,7 @@ cdef class EmbeddedNumberFieldConversion cpdef matching_root(poly, target, ambient_field=None, margin=1, max_prec=None): - """ + r""" Given a polynomial and a target, this function chooses the root that target best approximates as compared in ambient_field. @@ -403,7 +403,7 @@ cpdef matching_root(poly, target, ambien cpdef closest(target, values, margin=1): - """ + r""" This is a utility function that returns the item in values closest to target (with respect to the \code{abs} function). If margin is greater than 1, and x and y are the first and second closest elements to target, diff -up src/sage/rings/padics/local_generic_element.pyx.orig src/sage/rings/padics/local_generic_element.pyx --- src/sage/rings/padics/local_generic_element.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/rings/padics/local_generic_element.pyx 2021-08-26 13:02:41.298210009 -0600 @@ -401,7 +401,7 @@ cdef class LocalGenericElement(Commutati return ans def _latex_(self): - """ + r""" Returns a latex representation of self. EXAMPLES:: diff -up src/sage/rings/padics/padic_capped_absolute_element.pyx.orig src/sage/rings/padics/padic_capped_absolute_element.pyx --- src/sage/rings/padics/padic_capped_absolute_element.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/rings/padics/padic_capped_absolute_element.pyx 2021-08-26 13:02:41.299210010 -0600 @@ -383,7 +383,7 @@ cdef class pAdicCappedAbsoluteElement(CA return ans def _exp_binary_splitting(self, aprec): - """ + r""" Compute the exponential power series of this element This is a helper method for :meth:`exp`. @@ -443,7 +443,7 @@ cdef class pAdicCappedAbsoluteElement(CA return ans def _exp_newton(self, aprec, log_algorithm=None): - """ + r""" Compute the exponential power series of this element This is a helper method for :meth:`exp`. diff -up src/sage/rings/padics/padic_fixed_mod_element.pyx.orig src/sage/rings/padics/padic_fixed_mod_element.pyx --- src/sage/rings/padics/padic_fixed_mod_element.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/rings/padics/padic_fixed_mod_element.pyx 2021-08-26 13:02:43.006212006 -0600 @@ -449,7 +449,7 @@ cdef class pAdicFixedModElement(FMElemen return ans def _exp_binary_splitting(self, aprec): - """ + r""" Compute the exponential power series of this element This is a helper method for :meth:`exp`. @@ -508,7 +508,7 @@ cdef class pAdicFixedModElement(FMElemen return ans def _exp_newton(self, aprec, log_algorithm=None): - """ + r""" Compute the exponential power series of this element This is a helper method for :meth:`exp`. diff -up src/sage/rings/padics/padic_generic_element.pyx.orig src/sage/rings/padics/padic_generic_element.pyx --- src/sage/rings/padics/padic_generic_element.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/rings/padics/padic_generic_element.pyx 2021-08-26 13:02:44.199213403 -0600 @@ -544,7 +544,7 @@ cdef class pAdicGenericElement(LocalGene return self._repr_(mode=mode) def _repr_(self, mode=None, do_latex=False): - """ + r""" Returns a string representation of this element. INPUT: @@ -3024,7 +3024,7 @@ cdef class pAdicGenericElement(LocalGene return series_unit*nfactorial_unit.inverse_of_unit()<<(series_val-nfactorial_val) def _exp_binary_splitting(self, aprec): - """ + r""" Compute the exponential power series of this element This is a helper method for :meth:`exp`. @@ -3070,7 +3070,7 @@ cdef class pAdicGenericElement(LocalGene raise NotImplementedError("the binary splitting algorithm is not implemented for the parent: %s" % self.parent()) def _exp_newton(self, aprec, log_algorithm=None): - """ + r""" Compute the exponential power series of this element This is a helper method for :meth:`exp`. diff -up src/sage/rings/polynomial/multi_polynomial_libsingular.pyx.orig src/sage/rings/polynomial/multi_polynomial_libsingular.pyx --- src/sage/rings/polynomial/multi_polynomial_libsingular.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/rings/polynomial/multi_polynomial_libsingular.pyx 2021-08-26 13:02:44.204213409 -0600 @@ -2506,7 +2506,7 @@ cdef class MPolynomial_libsingular(MPoly return char_to_str(s) def _latex_(self): - """ + r""" Return a polynomial LaTeX representation of this polynomial. EXAMPLES:: diff -up src/sage/rings/polynomial/ore_polynomial_element.pyx.orig src/sage/rings/polynomial/ore_polynomial_element.pyx --- src/sage/rings/polynomial/ore_polynomial_element.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/rings/polynomial/ore_polynomial_element.pyx 2021-08-26 13:02:44.205213410 -0600 @@ -1705,8 +1705,8 @@ cdef class OrePolynomial(AlgebraElement) var = "" s += "%s %s"%(x,var) s = s.replace(" + -", " - ") - s = re.sub(" 1(\.0+)? \|"," ", s) - s = re.sub(" -1(\.0+)? \|", " -", s) + s = re.sub(r" 1(\.0+)? \|"," ", s) + s = re.sub(r" -1(\.0+)? \|", " -", s) s = s.replace("|","") if s == " ": return "0" diff -up src/sage/rings/polynomial/polynomial_element.pyx.orig src/sage/rings/polynomial/polynomial_element.pyx --- src/sage/rings/polynomial/polynomial_element.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/rings/polynomial/polynomial_element.pyx 2021-08-26 13:02:44.209213414 -0600 @@ -2712,8 +2712,8 @@ cdef class Polynomial(CommutativeAlgebra var = "" s += "%s %s" % (x, var) s = s.replace(" + -", " - ") - s = re.sub(" 1(\.0+)? \|"," ", s) - s = re.sub(" -1(\.0+)? \|", " -", s) + s = re.sub(r" 1(\.0+)? \|"," ", s) + s = re.sub(r" -1(\.0+)? \|", " -", s) s = s.replace("|","") if s == " ": return "0" @@ -2813,7 +2813,7 @@ cdef class Polynomial(CommutativeAlgebra raise IndexError("polynomials are immutable") cpdef _floordiv_(self, right): - """ + r""" Quotient of division of self by other. This is denoted //. If self = quotient \* right + remainder, this function returns @@ -6609,8 +6609,8 @@ cdef class Polynomial(CommutativeAlgebra where the roots `a` and `b` are to be considered in the algebraic closure of the fraction field of the coefficients and counted with multiplicities. If the polynomials are not monic this quantity is - multiplied by `\\alpha_1^{deg(p_2)} \\alpha_2^{deg(p_1)}` where - `\\alpha_1` and `\\alpha_2` are the leading coefficients of `p_1` and + multiplied by `\alpha_1^{deg(p_2)} \alpha_2^{deg(p_1)}` where + `\alpha_1` and `\alpha_2` are the leading coefficients of `p_1` and `p_2` respectively. INPUT: diff -up src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx.orig src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx --- src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx 2021-08-26 13:02:44.210213416 -0600 @@ -1389,7 +1389,7 @@ cdef class Polynomial_integer_dense_flin return smallInteger(fmpz_poly_degree(self.__poly)) def pseudo_divrem(self, B): - """ + r""" Write ``A = self``. This function computes polynomials `Q` and `R` and an integer `d` such that diff -up src/sage/rings/polynomial/real_roots.pyx.orig src/sage/rings/polynomial/real_roots.pyx --- src/sage/rings/polynomial/real_roots.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/rings/polynomial/real_roots.pyx 2021-08-26 13:02:44.212213418 -0600 @@ -1252,7 +1252,7 @@ def de_casteljau_intvec(Vector_integer_d cdef double half_ulp = ldexp(1.0 * 65/64, -54) def intvec_to_doublevec(Vector_integer_dense b, long err): - """ + r""" Given a vector of integers A = [a1, ..., an], and an integer error bound E, returns a vector of floating-point numbers B = [b1, ..., bn], lower and upper error bounds F1 and F2, and @@ -2142,7 +2142,7 @@ def subsample_vec_doctest(a, slen, llen) return subsample_vec(a, slen, llen) def maximum_root_first_lambda(p): - """ + r""" Given a polynomial with real coefficients, computes an upper bound on its largest real root, using the first-\lambda algorithm from "Implementations of a New Theorem for Computing Bounds for Positive diff -up src/sage/rings/real_double.pyx.orig src/sage/rings/real_double.pyx --- src/sage/rings/real_double.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/rings/real_double.pyx 2021-08-26 13:02:44.214213420 -0600 @@ -2092,7 +2092,7 @@ cdef class RealDoubleElement(FieldElemen return a def log(self, base=None): - """ + r""" Return the logarithm. INPUT: diff -up src/sage/rings/real_mpfi.pyx.orig src/sage/rings/real_mpfi.pyx --- src/sage/rings/real_mpfi.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/rings/real_mpfi.pyx 2021-08-26 13:02:44.216213423 -0600 @@ -1310,7 +1310,7 @@ cdef class RealIntervalFieldElement(Ring return self.str(10) def _latex_(self): - """ + r""" Return a latex representation of ``self``. EXAMPLES:: diff -up src/sage/rings/semirings/tropical_semiring.pyx.orig src/sage/rings/semirings/tropical_semiring.pyx --- src/sage/rings/semirings/tropical_semiring.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/rings/semirings/tropical_semiring.pyx 2021-08-26 13:02:44.216213423 -0600 @@ -99,7 +99,7 @@ cdef class TropicalSemiringElement(Eleme return repr(self._val) def _latex_(self): - """ + r""" Return a latex representation of ``self``. EXAMPLES:: diff -up src/sage/rings/tate_algebra_element.pyx.orig src/sage/rings/tate_algebra_element.pyx --- src/sage/rings/tate_algebra_element.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/rings/tate_algebra_element.pyx 2021-08-26 13:02:44.218213425 -0600 @@ -3447,7 +3447,7 @@ cdef class TateAlgebraElement(Commutativ @coerce_binop def Spoly(self, other): - """ + r""" Return the S-polynomial of this series and ``other``. INPUT: diff -up src/sage/structure/coerce_maps.pyx.orig src/sage/structure/coerce_maps.pyx --- src/sage/structure/coerce_maps.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/structure/coerce_maps.pyx 2021-08-26 13:02:44.219213426 -0600 @@ -312,7 +312,7 @@ cdef class NamedConvertMap(Map): cdef class CallableConvertMap(Map): def __init__(self, domain, codomain, func, parent_as_first_arg=None): - """ + r""" This lets one easily create maps from any callable object. This is especially useful to create maps from bound methods. diff -up src/sage/symbolic/expression_conversions.py.orig src/sage/symbolic/expression_conversions.py --- src/sage/symbolic/expression_conversions.py.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/symbolic/expression_conversions.py 2021-08-27 08:13:43.289141017 -0600 @@ -969,7 +969,7 @@ class FriCASConverter(InterfaceInit): super(FriCASConverter, self).__init__(sage.interfaces.fricas.fricas) def pyobject(self, ex, obj): - """ + r""" Return a string which, when evaluated by FriCAS, returns the object as an expression. diff -up src/sage/symbolic/expression.pyx.orig src/sage/symbolic/expression.pyx --- src/sage/symbolic/expression.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/symbolic/expression.pyx 2021-08-26 13:02:44.223213431 -0600 @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -""" +r""" Symbolic Expressions RELATIONAL EXPRESSIONS: @@ -4979,7 +4979,7 @@ cdef class Expression(CommutativeRingEle expand_rational = rational_expand = expand def expand_trig(self, full=False, half_angles=False, plus=True, times=True): - """ + r""" Expand trigonometric and hyperbolic functions of sums of angles and of multiple angles occurring in self. For best results, self should already be expanded. @@ -7567,7 +7567,7 @@ cdef class Expression(CommutativeRingEle return new_Expression_from_GEx(self._parent, x) def gosper_term(self, n): - """ + r""" Return Gosper's hypergeometric term for ``self``. Suppose ``f``=``self`` is a hypergeometric term such that: diff -up src/sage/symbolic/function.pyx.orig src/sage/symbolic/function.pyx --- src/sage/symbolic/function.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/symbolic/function.pyx 2021-08-26 13:02:44.224213432 -0600 @@ -1283,7 +1283,7 @@ cdef class BuiltinFunction(Function): # this is required to read old pickles of erf, elliptic_ec, etc. def __setstate__(self, state): - """ + r""" EXAMPLES:: sage: cot.__setstate__([1,0]) diff -up src/sage/symbolic/ring.pyx.orig src/sage/symbolic/ring.pyx --- src/sage/symbolic/ring.pyx.orig 2021-08-22 02:44:34.000000000 -0600 +++ src/sage/symbolic/ring.pyx 2021-08-26 13:02:44.225213433 -0600 @@ -86,7 +86,7 @@ cdef class SymbolicRing(CommutativeRing) return "Symbolic Ring" def _latex_(self): - """ + r""" Return latex representation of the symbolic ring. EXAMPLES:: @@ -504,7 +504,7 @@ cdef class SymbolicRing(CommutativeRing) return new_Expression_from_GEx(self, exp) def wild(self, unsigned int n=0): - """ + r""" Return the n-th wild-card for pattern matching and substitution. INPUT: @@ -859,7 +859,7 @@ cdef class SymbolicRing(CommutativeRing) asm.forget() def var(self, name, latex_name=None, n=None, domain=None): - """ + r""" Return a symbolic variable as an element of the symbolic ring. INPUT: