[Tutor] double nodes being enter into tree structure

Mats Wichmann mats at wichmann.us
Fri Jun 28 09:34:11 EDT 2019


On 6/28/19 12:10 AM, mhysnm1964 at gmail.com wrote:

> class Node(object):
> 
> # I am not 100% sure the purpose of (object) does.

as to this bit:  having your class inherit from object means it's a
"new-style class".  That's only significant if you're writing code that
is expected to run under Python 2; in Python 3 all classes are new-style
and you don't need to inherit from object to get that - and if you run a
code checker on your program in a Python 3 context, it will likely tell
you so.




More information about the Tutor mailing list