@@ -11332,19 +11332,15 @@ def neighbor_iterator(self, vertex, closed=False):
11332
11332
for u in self._backend.iterator_nbrs(vertex):
11333
11333
yield u
11334
11334
11335
- def vertices(self, sort=None , key=None, degree=None, vertex_property=None):
11335
+ def vertices(self, sort=False , key=None, degree=None, vertex_property=None):
11336
11336
r"""
11337
11337
Return a list of the vertices.
11338
11338
11339
11339
INPUT:
11340
11340
11341
- - ``sort`` -- boolean (default: ``None``); if ``True``, vertices are
11342
- sorted according to the default ordering
11343
-
11344
- As of :trac:`22349`, this argument must be explicitly
11345
- specified (unless a ``key`` is given); otherwise a warning
11346
- is printed and ``sort=True`` is used. The default will
11347
- eventually be changed to ``False``.
11341
+ - ``sort`` -- boolean (default: ``False``); whether to sort vertices
11342
+ according the ordering specified with parameter ``key``. If ``False``
11343
+ (default), vertices are not sorted.
11348
11344
11349
11345
- ``key`` -- a function (default: ``None``); a function that takes a
11350
11346
vertex as its one argument and returns a value that can be used for
@@ -11432,20 +11428,7 @@ def vertices(self, sort=None, key=None, degree=None, vertex_property=None):
11432
11428
Traceback (most recent call last):
11433
11429
...
11434
11430
ValueError: sort keyword is False, yet a key function is given
11435
-
11436
- Deprecation warning for ``sort=None`` (:trac:`22349`)::
11437
-
11438
- sage: G = graphs.HouseGraph()
11439
- sage: G.vertices()
11440
- doctest:...: DeprecationWarning: parameter 'sort' will be set to False by default in the future
11441
- See https://github.com/sagemath/sage/issues/22349 for details.
11442
- [0, 1, 2, 3, 4]
11443
11431
"""
11444
- if sort is None:
11445
- if key is None:
11446
- deprecation(22349, "parameter 'sort' will be set to False by default in the future")
11447
- sort = True
11448
-
11449
11432
if (not sort) and key:
11450
11433
raise ValueError('sort keyword is False, yet a key function is given')
11451
11434
0 commit comments