to set the variables on the instance, set them on self. so:

    def __init__(self, token):
        self._token = token
        self._distinct_id = None

also, above, i've initialized self._distinct_id to None, which is good practice. you want to set up the instance variables you expect to use throughout the class in the __init__ function so that you can proceed on the assumption they exist everywhere else.

the reason they should be instance variables, rather than class variables, is that each instance of the library, i.e., the Mixpanel class, is intended to represent an interface to a particular project, and, when distinct_id is set, to a particular user. so they are specific to an instance, rather than the class. class variables are for when you want all instances to share something, which we don't in this case.