On Oct 30, 3:26 pm, Ian Bicking <[email protected]> wrote: > It's based on the dictionary API. get basically means: ... > So it makes sense based on that.
It definitely makes sense if you're familiar with the environment , and from a functional perspective. Its just very counter-intuitive for newcomers, as the various projects that use webob don't make the distinction very well / at all in their documentation. Someone from a php/perl/etc web-development background would easily assume that 'get' returns the corresponding form values, whether its a string or a list -- not simply the first item if it a list. Using something like getone implies the singular functionality, and that there is a getall equivalent. i'm assuming that's why the MultiDict and NestedMultiDict objects use that syntax Maybe the params object in MultiDict and NestedMultiDict , or the DictMixin object can have a better docstring that explains that this gets a single value, and that a getall method exists ? btw, i miss how perl handled this... since variables are decorated , one could change the value based on context via the automatically created wantarray variable in subroutines -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=.
