[Paste] Is there a get() in MultiDict?

Top Page
Author: limodou
Date:  
To: paste-users
Subject: [Paste] Is there a get() in MultiDict?
I've used webob in my project uliweb, and I think it's wonderful.

When I was using it, I found there is no get() of MultiDict, so if I missed
it?

I implemented one myself, the code is simple:

    def get(self, key, default=None):
        for k, v in self._items:
            if key == k:
                return v
        return default

So I think it's handly when you don't want to process an excpetion if there
is no key existed.

-- 
I like python!
UliPad <<The Python Editor>>: http://code.google.com/p/ulipad/
UliSpot <<UliPad Snippets>>: http://ulipad.appspot.com
UliWeb <<simple web framework>>: http://uliwebproject.appspot.com
My Blog: (new)http://http://hi.baidu.com/limodou (old)
http://www.donews.net/limodou
_______________________________________________
Paste-users mailing list
Paste-users@???
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users