To avoid the obvious bugs, I’d like to prevent the use of positional arguments with some functions. Is there any way to achieve that?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Only Python 3 can do it properly (and you used the python3 tag, so it’s fine):
using
**kwargswill let the user input any argument unless you check later. Also, it will hide the real arguments names from introspection.**kwargsis not the answer for this problem.Testing the program: