I want to generate a xml file. I have written a xml_generator method. When /xxx url hits i call this generator function. how should i return this Because returning instance of generator function creates an error.
+3
A:
if you meant you're returning a function, it will be erroneous when you're actually trying to return the results of the function. I.e.: my_function
instead of my_function()
.
stefano palazzo
2010-08-13 11:32:32
i ask for xml generator!!!!
Tauquir
2010-08-13 12:01:33
I'm sorry, I was trying to help... Here is another idea: A function doesn't have instances, but if you meant you're returning a function, it will be erroneous when you're actually trying to return the results of the function. I.e.: my_function() instead of my_function. Maybe you just forgot ()? Please don't down-vote me again if this has not solved your problem. We need some more information, maybe a bit of source code, to understand your question.
stefano palazzo
2010-08-13 12:08:21
functions are first class objects? how does returning a function from a function cause an error? You could pass a function around and do quite a bit to it (attribute assignments for example) without getting an error.
aaronasterling
2010-08-19 12:15:39