Pylons/pyramid — pull request #492 by rpatterson (2012-03-15 21:47:23+00:00)
Title: Support multiple request_param args.

Fixes #465, I think. :-)

I think I've got this done right, but, again, it's very naive since I don't know what any of this is for. Can someone review this pull request and educate me if I'm missing something. Then I'll add commits to address.

One of the things that may need some discussion is the difference between how the predicate `__text__` was generated for `request_param` and `match_param` before my changes. `match_param` only had coverage for `foo=bar` style params, not for `foo` params without values and does not have coverage for multiple params. `request_param` had coverage for both with and without values but, obviously, had no coverage for multiple params.

`match_param` would format a single `foo=bar` param as `['foo=bar']` in `__text__` while `request_param` would use `foo = bar` for a param with a value and `foo` for a param without a value. My fork currently supports the `foo` style for both `match_param` and `request_param` when there is only one param without a value. Since there was no coverage on the previous `request_param foo = bar` behavior for params with values but there was coverage for the `match_param ['foo=bar']` behavior, I left the `match_param ['foo=bar']` style for `request_param` as well. I've added coverage for this behavior as well. I've also added coverage for multiple params in the `__text__`.

Will someone review this discussion and my commits and help me understand if I'm misunderstanding things.