The @ above Hamilton Functions
Hamilton has a bunch of function modifiers, i.e. python decorators, to modify function behavior.
The behaviors vary based on the function modifier. Please see Decorators for the current list of supported ones.
Why would I use them?#
These function modifiers are either to:
Enable you to make lots of functions that vary by inputs concisely. E.g. to keep your code DRYer.
Provide functionality to make Hamilton more powerful. E.g. so you can break apart multiple outputs.
There unfortunately isn’t an easy thing to say here, other than, read the list of decorators and their functionality, and then if you see the need arise, use them 😀.