Python Forum
Help, not understanding how classes work...
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help, not understanding how classes work...
#2
Look at the definition of the _print_tree function. It takes four parameters - self, and three others. When you call it, it takes the instance as a parameter without a need to pass it every time when calling the method. So you have to provide the other three parameters. You pass two of them,
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Messages In This Thread
RE: Help, not understanding how classes work... - by wavic - Jan-20-2018, 06:07 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Understanding Python classes PythonNewbee 3 1,246 Nov-10-2022, 11:07 PM
Last Post: deanhystad
  I need help understanding a program structure using classes CompleteNewb 21 6,244 Feb-24-2022, 07:15 PM
Last Post: deanhystad
  Understanding Python super() for classes OmegaRed94 1 1,880 Jun-09-2021, 09:02 AM
Last Post: buran
  Using classes? Can I just use classes to structure code? muteboy 5 5,151 Nov-01-2017, 04:20 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020