After talking with Ian Bicking a bit tonight, I'm finally fully sold on retiring the one-letter variable names from Pylons. The most likely replacement names:
c -> context
g -> ??? (as globals/global is already taken)
h -> GONE (import the modules you need, most ppl want similar functions and can't find them anyways, importing them teaches people where they are, and shows them what else they might want to use)

In controllers, I think we can do away with the 'from ... import *'. While this works nicely for awhile, it almost always tends to leave a bad taste on people's mouth. The default controller template could instead come with the only necessary import:

from yourprojb.lib.base import BaseController

It's pretty trivial to add the:
from pylons import request
from pylons.templating import render

as desired.

This also means we could get rid of the somewhat awkward __all__ export stuff hanging around in the base controller.

Pylons 0.9.7 will of course hang onto the one letter names and such for legacy, while 1.0 will drop them.

PS: So sorry Mike and James and anyone else working on the book, but I think this will really help, hopefully just a global search/replace in the text? :)

Any other thoughts/suggestions?

Cheers,
Ben

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to