Home | Trees | Indices | Help |
|
---|
|
sql(ds)(some_element)
The sql class is instantiated with ds as the constructor's argument. The instance implements the __call__ interface, which enables me to use it like a function. This 'function' is then applied to the some_element parameter. This is especially usefull when programming in a functional style as I did here.
It takes a while to get used to this type of thinking, but it's certainly worthwhile. Some consider this kind of programming beautifull in artistic meaning of the word ;-)
|
|||
| __init__(self, ds) | ||
|
__call__(self,
*args) The arguments must either provide an __sql__() function or be convertable to strings. |
|
|
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0alpha3 on Wed Feb 20 18:17:29 2008 | http://epydoc.sourceforge.net |