On Aug 26, 8:13 am, Dave Angel <da...@ieee.org> wrote: > You can probably work around this by replacing the staticmethod > decorator with an equivalent function call:. > > class Demo9(object): > def fact(n): > if n < 2: > return 1 > else: > return n * Demo.fact(n - 1) > > _classvar = fact(5) > fact = staticmethod(fact) > > print Demo9._classvar > xx = Demo9() > print xx.fact(6) > print Demo9.fact(8)
This won't work normally. It only worked for you because you made a typo. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list