[Python-ideas] anonymous object support

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Jul 25 01:48:47 CEST 2011


You could use a class decorator to help with this.

def instance(cls):
     return cls()

@instance
class foo(object):
   x = 42

-- 
Greg



More information about the Python-ideas mailing list