Welcome to Brannon's Reading Notes!

This serves as my personal page to keep and update my reading notes for Code Fellows Courses 201, 301, and 401.

Reading 9

Dunder Methods

Used, to enrich Python classes, dunder methods unlock access to powerful language features.

Operator Overloading

Use the following method to introduce comparative operators in class methods:

 from functools import total_ordering

 @total_ordering
 class Account:
    # ... (see above)

    def __eq__(self, other):
        return self.balance == other.balance

    def __lt__(self, other):
        return self.balance < other.balance

Proobability

Probability is asking, “what is the chance that some event will happen?” With iteration, especially in very large numbers, the statistics collected and the predicted probability merge closer and closer together. This is similar to the law of large numbers.