Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Input as function parameter
#1
When we have a function like this:

def function(param1, input=""):
    ...
What´s the variable of that input? How can I use it´s value inside that function?
Reply
#2
input is a python builtin_function_or_method class, and should never be used as an attribute this way.
Rename input to xinput or some other name, and change where it is used in the function as well.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Two arguments in input function Alfredd 4 811 Nov-09-2025, 12:56 AM
Last Post: Pedroski55
  Using a For Loop to subtract numbers from an input function. Anunderling 9 2,819 Sep-22-2025, 08:56 PM
Last Post: deanhystad
  function as parameter Azdaghost 2 1,386 Apr-01-2025, 07:10 PM
Last Post: DeaD_EyE
  Input function oldschool 1 1,255 Sep-14-2024, 01:02 PM
Last Post: deanhystad
  difference between forms of input a list to function akbarza 6 3,499 Feb-21-2024, 08:02 PM
Last Post: bterwijn
  determine parameter type in definition function akbarza 1 1,721 Aug-24-2023, 01:46 PM
Last Post: deanhystad
  Function parameter not writing to variable Karp 5 3,058 Aug-07-2023, 05:58 PM
Last Post: Karp
  [ERROR] ParamValidationError: Parameter validation failed: Invalid type for parameter gdbengo 3 19,929 Dec-26-2022, 08:48 AM
Last Post: ibreeden
Information How to take url in telegram bot user input and put it as an argument in a function? askfriends 0 3,131 Dec-25-2022, 03:00 PM
Last Post: askfriends
  Showing an empty chart, then input data via function kgall89 0 1,902 Jun-02-2022, 01:53 AM
Last Post: kgall89

Forum Jump:

User Panel Messages

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