Stay DRY when writing Python code


Want to stay DRY when writing Python code?
An easy way is to create a library type, containing your helper functions in Python, that your type can mix. For example, type MyType mixes MyLibrary. Any Python function implemented on MyType will get access to all the methods implemented in MyLibrary.