Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Class issue
#3
(Mar-31-2020, 10:05 PM)deanhystad Wrote: def dist(self, sample) instead of def dist(sample, self)

When you call self.func(a, b, c) the actual function call is func(self, a, b, c).
Thanks it worked! However, I'm sure I tried it :/ but nevermind . Thanks a lot mate
Reply


Messages In This Thread
Class issue - by Reldaing - Mar-31-2020, 09:55 PM
RE: Class issue - by deanhystad - Mar-31-2020, 10:05 PM
RE: Class issue - by Reldaing - Mar-31-2020, 10:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Child class inheritance issue eakanathan 3 1,329 Apr-21-2022, 12:03 PM
Last Post: deanhystad
  Issue referencing new instance from other class nanok66 3 2,216 Jul-31-2020, 02:07 AM
Last Post: nanok66
  Issue with def norm in class Vector DimosG 4 2,479 Mar-26-2020, 05:03 PM
Last Post: DimosG

Forum Jump:

User Panel Messages

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