Skip to content

Commit 251d36b

Browse files
committed
rename __custom_name -> _custom_name
1 parent 826c430 commit 251d36b

23 files changed

+74
-75
lines changed

src/sage/algebras/letterplace/free_algebra_letterplace.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ cdef class FreeAlgebra_letterplace(Algebra):
2929
cdef int _ngens
3030
cdef int _nb_slackvars
3131
cdef object __monoid
32-
cdef public object __custom_name
32+
cdef public object _custom_name
3333
cdef str exponents_to_string(self, E)
3434
cdef str exponents_to_latex(self, E)
3535
cdef tuple _degrees

src/sage/categories/hopf_algebras_with_basis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class HopfAlgebrasWithBasis(CategoryWithAxiom_over_base_ring):
3636
sage: A = C.example(); A # needs sage.groups
3737
An example of Hopf algebra with basis: the group algebra of the
3838
Dihedral group of order 6 as a permutation group over Rational Field
39-
sage: A.__custom_name = "A" # needs sage.groups
39+
sage: A._custom_name = "A" # needs sage.groups
4040
sage: A.category() # needs sage.groups
4141
Category of finite dimensional hopf algebras with basis over Rational Field
4242

src/sage/categories/modules_with_basis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ class ModulesWithBasis(CategoryWithAxiom_over_base_ring):
6666
6767
Let `X` and `Y` be two modules with basis. We can build `Hom(X,Y)`::
6868
69-
sage: X = CombinatorialFreeModule(QQ, [1,2]); X.__custom_name = "X" # needs sage.modules
70-
sage: Y = CombinatorialFreeModule(QQ, [3,4]); Y.__custom_name = "Y" # needs sage.modules
69+
sage: X = CombinatorialFreeModule(QQ, [1,2]); X._custom_name = "X" # needs sage.modules
70+
sage: Y = CombinatorialFreeModule(QQ, [3,4]); Y._custom_name = "Y" # needs sage.modules
7171
sage: H = Hom(X, Y); H # needs sage.modules
7272
Set of Morphisms from X to Y
7373
in Category of finite dimensional vector spaces with basis over Rational Field

src/sage/combinat/cluster_complex.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,9 @@ def __init__(self, W, k, coxeter_element, algorithm):
223223
self._w0 = w
224224
self._k = k
225225
if k == 1:
226-
self.__custom_name = 'Cluster complex'
226+
self._custom_name = 'Cluster complex'
227227
else:
228-
self.__custom_name = 'Multi-cluster complex'
228+
self._custom_name = 'Multi-cluster complex'
229229

230230
self.set_immutable()
231231

@@ -271,7 +271,7 @@ def _repr_(self):
271271
sage: ClusterComplex(['A', 2])._repr_()
272272
"Cluster complex of type ['A', 2] with 5 vertices and 5 facets"
273273
"""
274-
name = self.__custom_name
274+
name = self._custom_name
275275
name += (' of type %s with %s vertices and %s facets'
276276
% (self.cartan_type(), len(self.vertices()),
277277
len(self._facets)))

src/sage/combinat/subword_complex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,7 @@ def __init__(self, Q, w, algorithm="inductive"):
11311131
SimplicialComplex.__init__(self, maximal_faces=Fs,
11321132
maximality_check=False,
11331133
category=cat)
1134-
self.__custom_name = 'Subword complex'
1134+
self._custom_name = 'Subword complex'
11351135
self._W = W
11361136
try:
11371137
T = W.coxeter_matrix().coxeter_type()

src/sage/groups/perm_gps/permgroup_element.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ cdef class PermutationGroupElement(MultiplicativeGroupElement):
2222
cpdef PermutationGroupElement _generate_new_GAP(self, old)
2323
cpdef _gap_list(self)
2424
cpdef domain(self)
25-
cdef public __custom_name
25+
cdef public _custom_name
2626
cpdef list _act_on_list_on_position(self, list x)
2727
cpdef ClonableIntArray _act_on_array_on_position(self, ClonableIntArray x)
2828
cpdef ETuple _act_on_etuple_on_position(self, ETuple x)

src/sage/interfaces/interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@ def __repr__(self):
11711171
s = self._repr_()
11721172
if self._name in s:
11731173
try:
1174-
s = s.replace(self._name, getattr(self, '__custom_name'))
1174+
s = s.replace(self._name, getattr(self, '_custom_name'))
11751175
except AttributeError:
11761176
pass
11771177
if cr:

src/sage/interfaces/singular.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1400,7 +1400,7 @@ def _repr_(self):
14001400
"""
14011401
s = super(SingularElement, self)._repr_()
14021402
if self._name in s:
1403-
if (not hasattr(self, "__custom_name")) and self.type() == 'matrix':
1403+
if (not hasattr(self, "_custom_name")) and self.type() == 'matrix':
14041404
s = self.parent().eval('pmat(%s,20)'%(self.name()))
14051405
return s
14061406

src/sage/libs/gap/element.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ cdef class GapElement(RingElement):
720720
...
721721
AttributeError: 'some_name' does not define a GAP function
722722
"""
723-
if name in ('__dict__', '_getAttributeNames', '__custom_name', 'keys'):
723+
if name in ('__dict__', '_getAttributeNames', '_custom_name', 'keys'):
724724
raise AttributeError('Python special name, not a GAP function.')
725725
try:
726726
proxy = make_GapElement_MethodProxy\

src/sage/matroids/basis_matroid.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@ cdef class BasisMatroid(BasisExchangeMatroid):
11771177
11781178
"""
11791179
N = BasisMatroid(M=self)
1180-
N.rename(getattr(self, '__custom_name'))
1180+
N.rename(getattr(self, '_custom_name'))
11811181
return N
11821182

11831183
def __deepcopy__(self, memo=None):
@@ -1201,7 +1201,7 @@ cdef class BasisMatroid(BasisExchangeMatroid):
12011201
if memo is None:
12021202
memo = {}
12031203
N = BasisMatroid(M=self)
1204-
N.rename(getattr(self, '__custom_name'))
1204+
N.rename(getattr(self, '_custom_name'))
12051205
return N
12061206

12071207
def __reduce__(self):
@@ -1230,7 +1230,7 @@ cdef class BasisMatroid(BasisExchangeMatroid):
12301230
"""
12311231
import sage.matroids.unpickling
12321232
BB = bitset_pickle(self._bb)
1233-
data = (self._E, self._matroid_rank, getattr(self, '__custom_name'), BB)
1233+
data = (self._E, self._matroid_rank, getattr(self, '_custom_name'), BB)
12341234
version = 0
12351235
return sage.matroids.unpickling.unpickle_basis_matroid, (version, data)
12361236

0 commit comments

Comments
 (0)