Classes

Instance Attributes

self.expired is an instance attribute whose value is calculated using other instance attributes:

class Promo:
    def __init__(self, name, expires):
        self.name=name
        self.expires=expires
        self.expired = self.expires <= NOW