>>>>> kj <no.em...@please.post> (k) wrote: >k> No, the fact() function here represents an internal "helper" >k> function. It is meant to be called only once to help initialize >k> a class variable that would be inconvenient to initialize otherwise; >k> this helper function is not meant to be called from outside the >k> class statement. Granted, in the example I gave, the "helper" >k> function (factorial) is a bit silly, but that was just intended as >k> a simple and familiar example of a recursive function. The actual >k> function that motivated this post would be considerably more >k> difficult to explain and would have obscured the point of the post.
Classes don't have helper functions; they have methods. Instance methods, static methods or class methods. Your's isn't either of these. Methods are to be called like `something.method(...)'. -- Piet van Oostrum <p...@cs.uu.nl> URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4] Private email: p...@vanoostrum.org -- http://mail.python.org/mailman/listinfo/python-list