-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Mike,

On 9 Oct 2010, at 13:33, Mike Burrows wrote:
I don't know, but I dislike duplication of the decorators anyway - the
interface is already described by the routing.


I suppose one could say that the interface is "described" in the routing but I feel that would be stretching the point a little. That description is:

1) implicit, (pace your str() addition)
2) arguably wrong, in the sense that the method passed to the controller is not what the programmer specified for "_method" 3) adrift from the documentation in minor but potentially confusing detail in that the routes created by map.resource() use the old-style colon+parenthesis style which no longer matches the curly brace style used in the documentation

FWIW, I usually adjust that particular line of Routes code to conform to my political beliefs [1]:

- - if old_method:
+ if old_method and not old_method in ['PUT','DELETE']:

The change has no effect on nosetests' results and for me it has the advantage that it allows me to continue using the (usefully explicit) @rest.restrict decorator.

I found myself wondering about the ostensible purpose of that particular manipulation.

[1] 
http://www.verynicejoke.com/jokes/light-bulbs/lightbulb-joke-collection-103/JID951/


- --
Cheers,

Graham

http://www.linkedin.com/in/ghiggins





-----BEGIN PGP SIGNATURE-----

iEYEARECAAYFAkywmm4ACgkQOsmLt1NhivxtZACeJy2KNyd9jLSpgZHkD/Vzbepl
/UsAnjZY+JCVLX1Iy1fqdIHSN/JXOixNiQCVAgUBTLCablnrWVZ7aXD1AQJJYgP/
Srs55CZbf88FaQaVZvIXlFCpXap0ZLtROq/WmsJ8flvdWJ8u440qFTEz9GXpLiGu
TBkTX87Oo0M64eJxx1521m/oJnYfoCuSJIqT2M2LTNNGkLw18VaFzU0Tab6xSbZ/
ACZ7QJje6jFVC1bKrf3iMA99eETrWEL+Rr58z+rVdgc=
=5ae6
-----END PGP SIGNATURE-----

--
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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-discuss?hl=en.

Reply via email to