bool(MergeDict()) should evaluate to False if component dicts are empty
|Reported by:||Tilman Koschnick||Owned by:||nobody|
|Cc:||antonbaklanov@…, bmispelon@…||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Currently, MergeDict instances are considered True, no matter what the contents of the component dicts are. So you could have 'request.GET or request.POST' evaluate to False and 'request.REQUEST' to True on the same request, which is counter-intuitive.
__nonzero__ method would fix this.
Change History (6)
comment:1 Changed 3 years ago by
|Component:||HTTP handling → Utilities|
|Patch needs improvement:||unset|
|Triage Stage:||Unreviewed → Accepted|