bool(MergeDict()) should evaluate to False if component dicts are empty
|Reported by:||til||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.
Adding a __nonzero__ method would fix this.
Change History (6)
Changed 3 years ago by til
comment:1 Changed 3 years ago by bak1an
- Component changed from HTTP handling to Utilities
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted