The signatures of functions and methods are the guardians of code integrity. They drive its usage and build its APIs. Besides the naming rules that we have discussed previously, special care has to be taken for arguments. This can be done through the following three simple rules:
- Build arguments by iterative design.
- Trust the arguments and your tests.
- Use *args and **kwargs magic arguments carefully.