Recursive method
Gordon McMillan
gmcm at hypernet.com
Tue Jul 13 16:41:08 EDT 1999
More information about the Python-list mailing list
Tue Jul 13 16:41:08 EDT 1999
- Previous message (by thread): Recursive method
- Next message (by thread): Recursive method
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Ralph Gauges writes: > ... (see code below). Unfortunately all I get is a > 'NameError' for makenodes, when the function is supposed to > call itself. ... > > def makeTree(): > . > . > def makenodes(C): > The problem is the nested definition. The name "makenodes" is local to makeTree and makeTree's locals are not visible inside makenodes. Unnest makenodes and it should work. - Gordon
- Previous message (by thread): Recursive method
- Next message (by thread): Recursive method
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list