D
D
Dream2021-07-25 10:04:21
Python
Dream, 2021-07-25 10:04:21

Is it possible to get a parameter before a function?

Is it possible to get a parameter before a function?
I have a parameter that is needed in the /lambda function

lambda user : user == ctx.author
user = ...

(User must be after the /lambda function in my code, otherwise it will not work)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
o5a, 2021-07-25
@o5a

This "parameter" is what is passed to the function.
lambda user: user
similar to the function

def myfunction(user):
    return user

What did you even want to do? Why take lambda?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question