Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Decoratros, class
#2
The inner function has to have the same arguments as the function it decorates. Normally this is done by using *args and **kwargs which match any arguments, but in your case your inside_check function needs a "self" argument. It doesn't have to use it, but it needs it so it can provide that as an argument and make the signature match.
Reply


Messages In This Thread
Decoratros, class - by niski1996 - Apr-21-2020, 12:37 PM
RE: Decoratros, class - by deanhystad - Apr-21-2020, 01:21 PM

Forum Jump:

User Panel Messages

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