James Stroud wrote:
Other than using modules, I thought @classmethod took care of this kind of need:

class SingleThing:
  some_values = {"fanciness":0}
  def __init__(self):
    raise Exception, "not enough preceding stars to be fancy enough"
  @classmethod
  def why_so_fancy(self):
    print "why make every thing so fancy?"

I call this pattern:

"Using a Class to Be Something Single Because It Already Is Single"

or "uactbssbiais", for short.

+1 VOTW (Vocabulation of the Week)

=)

STeVe
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to