@@ -802,7 +802,7 @@ def __hash__(self):
802802 """
803803 return hash (self .__set )
804804
805- def _repr_ (self ):
805+ def _repr_ (self ) -> str :
806806 """
807807 Print representation.
808808
@@ -2003,38 +2003,23 @@ def suspension(self, n=1, is_mutable=True):
20032003 rename_vertices = True )
20042004 return self .suspension (1 , is_mutable ).suspension (int (n - 1 ), is_mutable )
20052005
2006- def disjoint_union (self , right , rename_vertices = None , is_mutable = True ):
2006+ def disjoint_union (self , right , is_mutable = True ):
20072007 """
20082008 The disjoint union of this simplicial complex with another one.
20092009
20102010 INPUT:
20112011
20122012 - ``right`` -- the other simplicial complex (the right-hand factor)
20132013
2014- - ``rename_vertices`` -- boolean (default: ``True``); if this is
2015- ``True``, the vertices in the disjoint union will be renamed by the
2016- formula: vertex "v" in the left-hand factor --> vertex "Lv" in the
2017- disjoint union, vertex "w" in the right-hand factor --> vertex "Rw"
2018- in the disjoint union. If this is false, this tries to construct the
2019- disjoint union without renaming the vertices; this will cause
2020- problems if the two factors have any vertices with names in common.
2021-
20222014 EXAMPLES::
20232015
20242016 sage: S1 = simplicial_complexes.Sphere(1)
20252017 sage: S2 = simplicial_complexes.Sphere(2)
20262018 sage: S1.disjoint_union(S2).homology() # needs sage.modules
20272019 {0: Z, 1: Z, 2: Z}
20282020 """
2029- if rename_vertices is not None :
2030- from sage .misc .superseded import deprecation
2031- deprecation (35907 , 'the "rename_vertices" argument is deprecated' )
2032-
2033- facets = []
2034- for f in self ._facets :
2035- facets .append (tuple (["L" + str (v ) for v in f ]))
2036- for f in right ._facets :
2037- facets .append (tuple (["R" + str (v ) for v in f ]))
2021+ facets = [tuple (f"L{ v } " for v in f ) for f in self ._facets ]
2022+ facets .extend (tuple (f"R{ v } " for v in f ) for f in right ._facets )
20382023 return SimplicialComplex (facets , is_mutable = is_mutable )
20392024
20402025 def wedge (self , right , rename_vertices = True , is_mutable = True ):
@@ -4516,7 +4501,7 @@ def _translation_from_numeric(self):
45164501
45174502 # this function overrides the standard one for GenericCellComplex,
45184503 # because it lists the maximal faces, not the total number of faces.
4519- def _repr_ (self ):
4504+ def _repr_ (self ) -> str :
45204505 """
45214506 Print representation.
45224507
0 commit comments