3 ms·
I'm not sure I understand the example in https://github.com/amolenaar/roles/blob/master/example.py https://github.com/amolenaar/roles/blob/master/example.py. Ma
by nerdponx 9y ago
I'm not sure I understand the example in https://github.com/amolenaar/roles/blob/master/example.py https://github.com/amolenaar/roles/blob/master/example.py. Maybe it's just too simple to demonstrate the benefits and so the code seems a little contrived. But why have the `context` thing at all? Why can't TransferMoney just handle the money transfer logic itself, without adding a whole extra layer of indirection with the `context` and then the MoneySource and MoneySink?