Hi,

This post totally went over my head and there's a lot to read which I
don't feel like doing right now, so I'll just give my 2 cent straight
away (and if it was already addressed, reply "already addressed", and
I will dig into the thread's archives):

2011/5/15 Chris McDonough <[email protected]>:
>    def aview(request):
>        abort(401)
>
>    def aview(request):
>        redirect('http://example.com')

What I *really* didn't like with Pylons abort() and redirect() was the
fact that that these functions were stopping the code flow without a
return statement. And it always freaked me out. :) I think it raised
an exception that was being caught by an underlying library, which
re-wrapped the exception in a http response. It looked wrong by design
from my point of view.

Because the above views don't explicitly return, they should
implicitly return None IMO.

I'd rather have an explicit return:

def aview(request):
    return redirect("http://example.com";)

We may also be able to do something like:

def aview(request):
    response = redirect("http://example.com";)
    # do something special with response
    return response

Bleh.
-- 
Alex | twitter.com/alexconrad

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to