Namespaces/introspection: collecting sql strings for validation

Martin Drautzburg Martin.Drautzburg at web.de
Mon Apr 23 15:44:43 EDT 2007


Peter Otten wrote:

>>>> def SQL(sql):
> ...     print sql
> ...
>>>> a = SQL("module")
> module # that one was obvious
>>>> class A:
> ...     b = SQL("class")
> ...     def method(self, c=SQL("default arg")):
> ...             d = SQL("method")
> ...

You are my hero. Indeed very cool!



More information about the Python-list mailing list