[Web-SIG] Random thoughts
John J Lee
jjl at pobox.com
Mon Nov 3 14:41:10 EST 2003
On Mon, 3 Nov 2003, Ian Bicking wrote:
> On Nov 3, 2003, at 12:23 PM, John J Lee wrote:
[...]
> > Why does the dictionary-ness of these objects force moving them from
> > attributes of request into attributes of a fields object? I don't
like
> > __getitem__, but I like breaking the "law of demeter" less. If people
> > prefer to avoid __getitem__, they could just be methods: .formdata(),
> > .querydata(), .postdata() (or use the new descriptor stuff? I know
> > nothing about that...).
>
> Sorry, I mixed that up a bit, I should have said: if form values are
[...]
I understood what you were saying, I think.
> we do), we've already given up strict dictionariness. Personally I
> like fields.post and fields.query more than having three separate
> attributes of request.
That was what I was complaining about: I don't like having to use multiple
dots (for the reason I gave above: LoD): I want request.postdata, rather
than request.fields.post. Of course, request.fields.post can still exist
if you like, but I don't think it should be part of the public interface.
John
More information about the Web-SIG
mailing list