mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-26 16:20:19 -04:00
Because ModelList implements `__add__` we can do the following: ```python ImmediateJobs() + ScheduledJobs() ImmediateJobs() + [] ``` Both of these call the `__add__` method of `ImmediateJobs`. What we can’t do is this: ```python [] + ScheduledJobs() ``` That tries to call the `__add__` method of list, which doesn’t know what to do with an instance of `ModelList`. The Pythonic way to deal with this is to implement `__radd__` (right add) which is invoked when our instance is on the right hand side of the addition operator.