Closed jhanarato closed 1 year ago
Dale says:
all expects an iterable, so when all(appearances) is the equivalent of all(iter(appearances)). For a mapping type, ie a dict-like thing, the default iteration is over the keys. So, a more explicit version of what you wrote is
all(k for k in appearances.keys())
That's assuming appearances behaves like a dict, but since you have control of what it's dunder iter method does, it can do whatever makes the most sense for an Apperances object to do.
This is fixed. __iter__
yields all keys or None
if missing.
At some point I deleted this test:
I've added it again and it still fails.