(self, state)
Test that top (current) level is of given state.
Test that top (current) level is of given state.
Test that top ( current ) level is of given state .
def isstate(self, state):
        """ Test that top (current) level is of given state. """
        if len(self):
            return self[-1] == state
        else:
            return False
def isstate ( self , state ) : if len ( self ) : return self [ - 1 ] == state else : return False