On 6/17/06, James Bennett <[EMAIL PROTECTED]> wrote: > I'm not convinced that it'd be a good thing to have request.POST > evaluate to True in these cases, but the reasoning is somewhat > pedantic. > > First and foremost, there's a logical difference between the request > method and the request parameters, so it makes sense that a test for > the method could evaluate to True while a test for the parameters > could evaluate to False. > > Second, since request.POST is supposed to be a "dictionary-like" > object, this would be unintuitive and, dare I say, "magical" behavior > -- an empty dictionary is False.
I agree 100% with James on this one. Having request.POST be an empty dictionary evaluating to True -- that's just too odd. I think we ought to bite the bullet and add request.method, which would be a shortcut to a normalized (all caps?) version of request.META['REQUEST_METHOD'], which is cumbersome to type and might not (?) always be upper case. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---