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
Assuming MultiDict supports dict protocol (which docstring suggests it does - ".., but behaves exactly like a normal dict.."), .values implementation is not correct. The returned object should be a view which, among other things, supports len. See https://docs.python.org/3/library/stdtypes.html?#dict-views
The text was updated successfully, but these errors were encountered:
defnull
added
the
Change
Neigher a bug nor a freature, but something that needs to be addressed.
label
Nov 27, 2018
So we basically need to implement a view-wrapper that applies a function to each value, but otherwise behaves like a view? There is nothing like this in the stdlib I think.
Another option would be to simply not support dict protocol. From my personal perspective MultiDict has a pretty narrow use case, namely to support FormsDict. And to handle web forms one doesn't need the whole richness of the dict. Would make the implementation much simpler. But that's my two cents.
bottle/bottle.py
Line 2112 in 9fb3b05
Assuming MultiDict supports
dict
protocol (which docstring suggests it does - ".., but behaves exactly like a normal dict.."),.values
implementation is not correct. The returned object should be a view which, among other things, supportslen
. See https://docs.python.org/3/library/stdtypes.html?#dict-viewsThe text was updated successfully, but these errors were encountered: