I came across a piece of code today that looks like this:
class ClassName(object):
def __init__(self):
self._vocabulary = None
def vocabulary(self):
self._vocabulary = self._vocabulary or self.keys()
return self._vocabulary
What exactly is the line self._vocabulary = self._vocabulary or self.keys()
doing?