Author Topic: When do we need (self) in methods??  (Read 164 times)


  • Newbie
  • *
  • Posts: 1
    • View Profile
When do we need (self) in methods??
« on: January 30, 2019, 11:46:48 AM »
So I thought every python function definition needed (self) unless multiple paramters are being specified...what's the rule regarding self??

My __init__(): function does NOT have self, and when I instantiate with Shet() it says takes 0 positional arguments but 1 given. I tried adding a self to the definition, then it says missing 'self'... I can't possibly add anything to Shet() because what would I add-it's not expecting any arguments. what am I to do?? So confused.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 10166
    • View Profile
Re: When do we need (self) in methods??
« Reply #1 on: January 30, 2019, 12:25:06 PM »
Hello mikewilliams,

Probably, the following article answers your question:
Best regards,
Alexey Pasumansky,
AgiSoft LLC