Multiple Variable-length arguments [on hold]
up vote
-3
down vote
favorite
Is there a way to define a function with multiple variable length arguments. For example
def param(*func,*args):
return([func(arg) for arg in args] for func in funcs])
beginner python-3.x functional-programming
New contributor
put on hold as off-topic by яүυк, Gerrit0, hjpotter92, 200_success, Sᴀᴍ Onᴇᴌᴀ 1 hour ago
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – яүυк, Gerrit0, hjpotter92, Sᴀᴍ Onᴇᴌᴀ
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
up vote
-3
down vote
favorite
Is there a way to define a function with multiple variable length arguments. For example
def param(*func,*args):
return([func(arg) for arg in args] for func in funcs])
beginner python-3.x functional-programming
New contributor
put on hold as off-topic by яүυк, Gerrit0, hjpotter92, 200_success, Sᴀᴍ Onᴇᴌᴀ 1 hour ago
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – яүυк, Gerrit0, hjpotter92, Sᴀᴍ Onᴇᴌᴀ
If this question can be reworded to fit the rules in the help center, please edit the question.
2
Welcome here! Who isfuncs
? More,def param(*func,*args)
isn't valid Python code. The code is broken => it'll probably be closed. Please add more context to your question and fix the code within it.
– яүυк
3 hours ago
1
The idea of multiple variable-length arguments doesn't even make sense: how would this function know wherefunc
ends andargs
begins? Furthermore, Code Review only reviews concrete working code, which this isn't. That said, if you have a particular working function that you think might benefit from a different parameter-passing design, feel free to post that for review, and we might be able to suggest a better way to do it.
– 200_success
1 hour ago
add a comment |
up vote
-3
down vote
favorite
up vote
-3
down vote
favorite
Is there a way to define a function with multiple variable length arguments. For example
def param(*func,*args):
return([func(arg) for arg in args] for func in funcs])
beginner python-3.x functional-programming
New contributor
Is there a way to define a function with multiple variable length arguments. For example
def param(*func,*args):
return([func(arg) for arg in args] for func in funcs])
beginner python-3.x functional-programming
beginner python-3.x functional-programming
New contributor
New contributor
New contributor
asked 3 hours ago
user31953
1
1
New contributor
New contributor
put on hold as off-topic by яүυк, Gerrit0, hjpotter92, 200_success, Sᴀᴍ Onᴇᴌᴀ 1 hour ago
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – яүυк, Gerrit0, hjpotter92, Sᴀᴍ Onᴇᴌᴀ
If this question can be reworded to fit the rules in the help center, please edit the question.
put on hold as off-topic by яүυк, Gerrit0, hjpotter92, 200_success, Sᴀᴍ Onᴇᴌᴀ 1 hour ago
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – яүυк, Gerrit0, hjpotter92, Sᴀᴍ Onᴇᴌᴀ
If this question can be reworded to fit the rules in the help center, please edit the question.
2
Welcome here! Who isfuncs
? More,def param(*func,*args)
isn't valid Python code. The code is broken => it'll probably be closed. Please add more context to your question and fix the code within it.
– яүυк
3 hours ago
1
The idea of multiple variable-length arguments doesn't even make sense: how would this function know wherefunc
ends andargs
begins? Furthermore, Code Review only reviews concrete working code, which this isn't. That said, if you have a particular working function that you think might benefit from a different parameter-passing design, feel free to post that for review, and we might be able to suggest a better way to do it.
– 200_success
1 hour ago
add a comment |
2
Welcome here! Who isfuncs
? More,def param(*func,*args)
isn't valid Python code. The code is broken => it'll probably be closed. Please add more context to your question and fix the code within it.
– яүυк
3 hours ago
1
The idea of multiple variable-length arguments doesn't even make sense: how would this function know wherefunc
ends andargs
begins? Furthermore, Code Review only reviews concrete working code, which this isn't. That said, if you have a particular working function that you think might benefit from a different parameter-passing design, feel free to post that for review, and we might be able to suggest a better way to do it.
– 200_success
1 hour ago
2
2
Welcome here! Who is
funcs
? More, def param(*func,*args)
isn't valid Python code. The code is broken => it'll probably be closed. Please add more context to your question and fix the code within it.– яүυк
3 hours ago
Welcome here! Who is
funcs
? More, def param(*func,*args)
isn't valid Python code. The code is broken => it'll probably be closed. Please add more context to your question and fix the code within it.– яүυк
3 hours ago
1
1
The idea of multiple variable-length arguments doesn't even make sense: how would this function know where
func
ends and args
begins? Furthermore, Code Review only reviews concrete working code, which this isn't. That said, if you have a particular working function that you think might benefit from a different parameter-passing design, feel free to post that for review, and we might be able to suggest a better way to do it.– 200_success
1 hour ago
The idea of multiple variable-length arguments doesn't even make sense: how would this function know where
func
ends and args
begins? Furthermore, Code Review only reviews concrete working code, which this isn't. That said, if you have a particular working function that you think might benefit from a different parameter-passing design, feel free to post that for review, and we might be able to suggest a better way to do it.– 200_success
1 hour ago
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
2
Welcome here! Who is
funcs
? More,def param(*func,*args)
isn't valid Python code. The code is broken => it'll probably be closed. Please add more context to your question and fix the code within it.– яүυк
3 hours ago
1
The idea of multiple variable-length arguments doesn't even make sense: how would this function know where
func
ends andargs
begins? Furthermore, Code Review only reviews concrete working code, which this isn't. That said, if you have a particular working function that you think might benefit from a different parameter-passing design, feel free to post that for review, and we might be able to suggest a better way to do it.– 200_success
1 hour ago