Skip to content

Instantly share code, notes, and snippets.

@razhangwei
Created March 24, 2019 19:33
Show Gist options
  • Save razhangwei/d53c0de56704b8b1d3149cf904e1bba0 to your computer and use it in GitHub Desktop.
Save razhangwei/d53c0de56704b8b1d3149cf904e1bba0 to your computer and use it in GitHub Desktop.
tips practice for defining class or function arguments #Python
  1. Make base class an abc.ABC and specify methods as abstractmethod or staticmethod as much as possible.
  2. Interface function, specify the known/shared arguments as much as possible. Keep the special argument as **kwargs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment