Fancy querystring parsing for python