Source

pycon2013 / func-py.txt

1
2
3
4
5
6
7
8
-   def __init__(self):
        self.attr = self._make_attr()  # _make_attr is "pure"
- Freeze data to make it immutable, can thaw later
- Example with _frozen True to False then __setitem__ will raise
    - Good to find where legacy code mutates things
- Coroutines push example with yield and send
    - Harder to debug
- Some problems are not fitted well to functional programming