Python Forum
Weird function defaults error?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Weird function defaults error?
#3
Python functions can have two types of arguments; position and key value. These correspond to the non-default and default terms used in the error you are seeing.

A key value argument is an argument that has a default value. In your function vhain, trans, receiver and amount are all key value arguments. Position arguments do not have a default value. In your function wallet and data are position arguments.

The rule in python is that all position arguments must appear first in the argument list, followed by all the position arguments. vhain is before wallet and data, a default argument before a non-default argument. You will have to move vhain.
Reply


Messages In This Thread
Weird function defaults error? - by wallgraffiti - Aug-07-2020, 03:00 PM
RE: Weird function defaults error? - by ndc85430 - Aug-07-2020, 03:07 PM
RE: Weird function defaults error? - by deanhystad - Aug-07-2020, 03:10 PM
RE: Weird function defaults error? - by ndc85430 - Aug-07-2020, 03:19 PM
RE: Weird function defaults error? - by deanhystad - Aug-07-2020, 05:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Shocked Script get's really weird error DaJohn 7 326 May-26-2024, 09:10 AM
Last Post: snippsat
Bug New to coding, Using the zip() function to create Diret and getting weird results Shagamatula 6 1,573 Apr-09-2023, 02:35 PM
Last Post: Shagamatula
  Weird SQLAchemy connection string error pawpaw 0 1,565 Jun-28-2020, 10:11 AM
Last Post: pawpaw
  [split] Python beginner: Weird Syntax Error mnsaathvika 1 2,195 Jul-22-2019, 06:14 AM
Last Post: buran
  Weird scoping error Stef 3 2,965 Jan-20-2019, 04:36 PM
Last Post: Stef
  Weird error in pycharm TheRedFedora 1 2,744 Mar-11-2018, 09:01 PM
Last Post: Larz60+
  weird error in random sentence generator bobger 9 5,831 Nov-29-2017, 07:34 PM
Last Post: bobger
  Error Handling is weird PythonAndArduino 1 3,062 Nov-09-2017, 05:08 AM
Last Post: Mekire
  Python beginner: Weird Syntax Error mentoly 5 10,463 Oct-13-2017, 08:06 AM
Last Post: gruntfutuk
  Error in using the output of one function in another function (beginner) MadsPJ 6 5,153 Mar-13-2017, 03:06 PM
Last Post: MadsPJ

Forum Jump:

User Panel Messages

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