>
> It is true Anthony, but i have always considered as a good practice 
> keeping the globals clean of unwanted imports and definitions, so in the 
> models i tend to do:
>
> def _():
>     # import's, vars, even define_table calls without 
>     # poluting globals
>     ...
> _()  # call the anonymous function
>
>
> Witch i think is a great way to go around, i think.
>

That's fine, though in your original post, you said, "Remember's the book 
says: don't import current into module level code", which seemed to imply 
that the above approach is *required*, even in model files. I just wanted 
to clarify that this is not the case in order to avoid confusion.

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to