On Mar 31, 2011, at 9:24 AM, VP wrote: > > Unless I misunderstand the issue at hand here, seriously, I do not > think this is web2py's scope to do this automatic mapping hyphens or > dashes to underscores. > > Hyphen/dash is a minus sign. You can't define a Python variable or > function that has a hyphen/dash. It's syntactically incorrect. I do > not think it's web2py's place to automatically fix this syntactical > error. (For one thing, it seems the side effect of this is that > underscores are automatically converted to hyphens, which is clearly > undesirable). > > Perhaps, the best thing is letting people turn on this mapping > optionally.
Perhaps so. FWIW, though, it's not a question of correcting a syntax error. The motivation is that underscores in URLs are unattractive, hard to type, and often hard to read (because of link underlining). The translation option is for having better-looking URLs. Here's a suggestion for everyone who is using the new parametric router: if you care about hyphen translation one way or the other, turn it on or off explicitly for now, so a change to the default doesn't bite you. This is *only* a concern if you have (internally) underscores in your a/c/f names.