up with PyGUI!

Greg Ewing greg at cosc.canterbury.ac.nz
Fri Sep 24 05:47:33 CEST 2004


Hans Nowak wrote:
> anton muhin wrote:
> 
>> class MainFrame(FrameDescription):
>>
>>   class b1(ButtonDescription):
>>     size = (40, 40)
>>     text = "b1"
>>
> I'm not sure if the construct described above is all 
> that great...

For a while now I've been wondering whether Python could
benefit from an "instance" statement that works similarly
to a class statement but creates instances instead of
classes.

e.g.

   class MainFrame(FrameDescription):

     instance b1(ButtonDescription):
       size = (40, 40)
       text = "b1"

Haven't figured out all the details of how it would
work, though...

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg




More information about the Python-list mailing list