-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Decorators doesn't follow smoothly from the Lambdas -> Closures line.
We also don't really explain why decorators are useful or give any examples of them. A possible alternate format:
- Start with lambdas (e.g. minimum of list +1)
- What if we need to generate many similar lambdas -> function factory (minimum of list +N)
- What if we want to generalise our function factory -> function as argument (function of list +N)
- Function factories can be used to staple any behaviour onto a function transparently through decorators
- Make small 'timing' decorator
This also ties into the issues with some people not realising the %% magic only works in the interpreter and asking for how you time things in scripts.
Also, in the academic class:
- People don't get
__str__and__repr__- explain the differences or just remove__repr__ - Add short comments to each method explaining why they've been defined
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request