You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will evaluate to False if foo.ogg contains no id3 tags. I believe this is because the mutagen file types do not have a __bool__ method, so the implicit boolean cast falls back on __len__ which ends up referring to the number of keys in the DictProxy for the file's id3 tags.
While I could work around this by explicitly checking for None vs a file type instance, I think it would be reasonable to expect the type to cast to True when it has successfully loaded a file.
The text was updated successfully, but these errors were encountered:
This will evaluate to
False
if foo.ogg contains no id3 tags. I believe this is because the mutagen file types do not have a__bool__
method, so the implicit boolean cast falls back on__len__
which ends up referring to the number of keys in the DictProxy for the file's id3 tags.While I could work around this by explicitly checking for
None
vs a file type instance, I think it would be reasonable to expect the type to cast toTrue
when it has successfully loaded a file.The text was updated successfully, but these errors were encountered: