Suppose that I have the following in a single .py
file:
class Graph( object ):
def ReadGraph( file_name ):
def ProcessGraph(file_name, verbose):
g=ReadGraph(file_name)
where ProcessGraph
is a driver class. When I type
ProcessGraph('testcase.txt', verbose=True)
I get this error
NameError: global name 'ReadGraph' is not defined
Could someone explain how to fix this error?