First of all you can follow along with the code in the article here (class and notebook). One thing we learned from the comments on the article is that __reversed__ should reverse the normal iteration. So newest to oldest, not by transaction amount (fix)
As there were no PR submissions other than ours we keep it short.
We made a Developer class pretty similar to the Account class example.
Even a word of caution is warranted as pointed out by _seemethere on the article's Reddit thread:
I would say that you should be careful with magic methods.
On one hand they can be extremely useful and extend your objects and on the other hand they can make using your library very difficult and hard to understand.
Use them where you feel as though they make sense and not just because it would be cool to use.
Useful tool, powerful and elegant, but use wisely.
Stay tuned for this week's code challenge where we get you to code up a weekly digest email of now playing/ upcoming movies or series.
By the way there is no deadline to these challenges, you can start any challenge at any time.
Just follow our instructions and start coding. Have fun!
Keep Calm and Code in Python!
-- Bob and Julian
Do you want to get 250+ concise and applicable Python tips in an ebook that will cost you less than 10 bucks (future updates included), check it out here.
"The discussions are succinct yet thorough enough to give you a solid grasp of the particular problem. I just wish I would have had this book when I started learning Python." - Daniel H
"Bob and Julian are the masters at aggregating these small snippets of code that can really make certain aspects of coding easier." - Jesse B
"This is now my favourite first Python go-to reference." - Anthony L
"Do you ever go on one of those cooking websites for a recipe and have to scroll for what feels like an eternity to get to the ingredients and the 4 steps the recipe actually takes? This is the opposite of that." - Sergio S