def getNextId(self, context):
        """ providing next id >= 0 on each call per context
            @param context is a string
            @return is an integer value being unique for given context
        """
        if not context in self.contexts:
            self.contexts[context] = -1
        self.contexts[context] += 1
        return self.contexts[context]
 providing next id >= 0 on each call per context
            @param context is a string
            @return is an integer value being unique for given context
        
recipes/Python/578015_Simple_enum_mechanism/recipe-578015.py