I often see% used in python's return and print statements.
However, there is nothing that comes to my mind even if I check the usage of %
on the net.
For example, the code below is a partial excerpt of the code that creates the bipartite graph, but %
is used in the return statement.
class Vertex(object):
"""A Vertex is a node in a graph"""
def __init__(self, label = ''):
self.label = label
def __repr__(self):
return 'Vertex(%s)' % repr(self.label)
__str__ = __repr__
%
mean?__str__ = __repr__
, so I would like to hear from you.Recommended Posts