https://bugzilla.wikimedia.org/show_bug.cgi?id=68705
--- Comment #5 from Fabian CommodoreFabianus@gmx.de --- Okay my mistake that 'bool(cat.articles)' return true if it's not None. But you could then do something like:
empty = True for page in cat.articles: empty = False if empty: # complain
Now I'm sure if this is slower (but it doesn't appear so). And maybe there is a more pythonic way. The for-else does not differ between an empty list and a non empty.