Michele Cella wrote:
Kevin Dangoor wrote:
OK, I know that "from <foo> import *" is not a generally accepted
practice. (There are a couple of exceptions, but that's generally the
case.)
I'm thinking that I'd like to change my general idiom to drop the
turbogears.<function> usage for much of my own code. expose, validate,
error_handler and redirect all get used enough that I'd rather not
type them out. (Of course, using TextMate, I just type exp<tab> and
get turbogears.expose(template=""), but still...)
I wanted to see what people think about changing this way... it may
seem minor, but it's a stylistic change that would appear in docs,
quickstart, etc. And we don't have to do from turbogears import *. It
could be from turbogears import expose, vaildate, ...
+1
That's also what I do on my code, it feels nicer IMHO and you keep an
eye on what comes from where.
from turbogears import controllers, widgets, validators
from turbogears import expose, validate, error_handler, flash, redicect
Ciao
Michele
+1
Cheers,
Simon