jbweston / miniver

Like Versioneer, but smaller
Creative Commons Zero v1.0 Universal
53 stars 10 forks source link

Use `any` instead of loop #46

Closed DimitriPapadopoulos closed 2 years ago

DimitriPapadopoulos commented 2 years ago

The simplified code is the very definition of built-in function any:

def any(iterable):
    for element in iterable:
        if element:
            return True
    return False
jbweston commented 2 years ago

Thanks! Sorry for the delay in seeing this (I think I need to adjust my GH notification settings)