Python Forum
help mising 1 required posisitional rgument
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help mising 1 required posisitional rgument
#5
def Contoh(tes, *args, **kwargs):

      try:
            return tes(*args, **kwargs)

      except Exception as err:
            print(type(err))

            raise

a = Contoh(nama="Tes")
print(a.tes())
Error:
a = Contoh(nama="Tes") TypeError: Contoh() missing 1 required positional argument: 'tes'
Reply


Messages In This Thread
why I do not understand at all with this I have to call the function with which code - by kobencry - Apr-11-2020, 12:08 PM

Forum Jump:

User Panel Messages

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