durusmail: quixote-users: Illegal Python Names cookbook recipe
Illegal Python Names cookbook recipe
2004-04-05
2004-04-05
2004-04-05
Bug fixes (was: Illegal Python Names cookbook recipe)
2004-04-07
2004-04-07
Bug fixes (was: Illegal Python Names cookbookrecipe)
2004-04-07
Patches for .7a3
2004-04-07
Re: Patches for .7a3
2004-04-08
StaticFile is broken (Quixote-0.7a3, scgi-1.2a2, Apache/1.3.27, FreeBSD 4.7)
2004-04-08
Re: Patches for .7a3
2004-04-21
2004-04-21
2004-04-06
2004-04-06
2004-04-06
2004-04-06
2004-04-06
2004-04-06
2004-04-06
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-07
Re: Illegal Python Names cookbook recipe
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-08
2004-04-07
2004-04-07
2004-04-07
2004-04-06
2004-04-05
2004-04-05
2004-04-05
Re: R: [Quixote-users] Illegal Python Names cookbook recipe
2004-04-06
Illegal Python Names cookbook recipe
Kendall Clark
2004-04-06
On Tue, Apr 06, 2004 at 03:42:55PM -0400, A.M. Kuchling wrote:

> +1.  It's regrettable that people who like to use '-' in their URLs have to
> pay a penalty, but I don't think it's really worth fixing.

The problem is more general than mere preference for "-" over "_".
What about URL bits that begin with a numeral? Or contain other
characters that aren't legal in Py identifiers?

The existing format of _q_exports is only clear and obvious because
it's what we've been living with. The two programmers I've talked to
about Quixote, neither of whom knew it before our talk, both wanted to
put callables into _q_exports, rather than strings naming
callables. One of them asked why the mapping was so inflexible.

And given the size of Neil's patch, I fail to see how this makes the
"mechanics of Quixote" less "simple".

It was easy to implement and easy to document; change "_q_exports is a
list of strings" to "_q_exports is a list of strings or 2-tuples. The
format of the 2-tuple is that the first member is the publicly
exportable name and the second member is the private Python identifier
it maps to".

I confess to having some sympathy with John's point about the order of
the 2-tuple not being explicit. However, since I've always thought of
_q_exports, conceptually, as being a list of mappings, public to
private, anyway, it now *is* more explicit. Where you stands depends
on where you sit.

Best,
Kendall Clark



reply