sage: g1=Graph([(0,'a')])
sage: g1.vertices()
<ipython-input-2-8314ec1f36bb>:1: DeprecationWarning: parameter 'sort' will be set to False by default in the future
See
http://trac.sagemath.org/22349 for details.
g1.vertices()
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Input In [2], in <cell line: 1>()
----> 1 g1.vertices()
File ~/Desktop/Sage/git/sage/src/sage/graphs/generic_graph.py:11196, in GenericGraph.vertices(self, sort, key, degree, vertex_property)
11193 raise ValueError('sort keyword is False, yet a key function is given')
11195 if sort:
> 11196 return sorted(self.vertex_iterator(degree=degree, vertex_property=vertex_property), key=key)
11197 return list(self.vertex_iterator(degree=degree, vertex_property=vertex_property))
You could instead use `g1.vertices(sort=False)` or as you suggested, `g1.vertices(key=hash)`, but `g1.vertices()` with no extra arguments is going to produce an error.