diff --git a/src/sage/combinat/cluster_complex.py b/src/sage/combinat/cluster_complex.py index 3c85d8db7a4..e263d983887 100644 --- a/src/sage/combinat/cluster_complex.py +++ b/src/sage/combinat/cluster_complex.py @@ -267,7 +267,7 @@ def _repr_(self): sage: ClusterComplex(['A', 2])._repr_() "Cluster complex of type ['A', 2] with 5 vertices and 5 facets" """ - if k == 1: + if self._k == 1: name = 'Cluster complex' else: name = 'Multi-cluster complex' diff --git a/src/sage/structure/sage_object.pyx b/src/sage/structure/sage_object.pyx index af9c0008672..10000aef394 100644 --- a/src/sage/structure/sage_object.pyx +++ b/src/sage/structure/sage_object.pyx @@ -160,6 +160,9 @@ cdef class SageObject: sage: P.rename('A polynomial ring') sage: P.get_custom_name() 'A polynomial ring' + sage: P.reset_name() + sage: P.get_custom_name() is None + True """ try: return self._SageObject__custom_name