LordLaraby <[EMAIL PROTECTED]> wrote: > For what it's worth, GenerateRandomColour does not access any instance > variables and therefore needn't even be a member of the class > Population. If you wanted it there for encapsulation purposes, consider > making it a staticmethod like so: > > @staticmethod() > def GenerateRandomColour(): > rn.seed() > colour = rn.choice(['C', 'P', 'Z']) > return colour
No parentheses on the decorator line, just '@staticmethod'. Otherwise, fine. Alex -- http://mail.python.org/mailman/listinfo/python-list