(🎁) final
class without a __bool__
or __len__
method can never test false
#12158
Labels
final
class without a __bool__
or __len__
method can never test false
#12158
This clashes with
truthy-bool
error code, which assumes that subtypes won't implement these methods.Any instance of
A
will never have a__bool__
or__len__
, method so these condition will always test true.More real life scenario:
The text was updated successfully, but these errors were encountered: