preheat_open.query.NoElementError
- exception preheat_open.query.NoElementError
Exception raised when no elements are found in a generator.
This exception is raised by the
unique()function when attempting to retrieve a unique element from a generator that yields no elements.- Example:
>>> def empty_generator(): ... return ... yield # This line is never reached >>> >>> try: ... unique(empty_generator()) ... except NoElementError as e: ... str(e) 'Generator yields no elements'