views:

76

answers:

1

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
i ask for xml generator!!!!
Tauquir
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
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