>
> copy/paste of the whole thing. The actual error message could not
>
> have said "node", as there's no such name in the method.
>
You are correct. I copied the error before I renamed node into Node. I have to
be more consistent here. :-)
The source for the error was still the same.
--
ht
> I recommend using a different name for the instances here, probably
>
> with a lower-case first letter. That would solve your problem _and_
>
> make your code more readable.
Thanks a lot! I was confused by the debuger gifing me the wrong line as
containing the error. I changed it regarding yo
On Tue, Jan 21, 2014 at 9:20 PM, Robert Voigtländer
wrote:
> def calcRoute(self):
> self.openlist.append(Node(self.start, None, 0, 0))
> for Node in self.openlist: print Node.pos, Node.parent, Node.g,
> Node.h, Node.f
You're using the name Node to mean two different things. I
Hi,
I have a problem using a class object within another class.
It is about the line:
self.openlist.append(Node(self.start, None, 0, 0))
If I use it in __init__ it works. If I use it in calcRoute(self) I get the
following error: local variable 'node' referenced before assignment The error
occ