8 Feb
2000
8 Feb
'00
12:11 a.m.
----- Original Message ----- From: Hung Jung Lu <hungjunglu@hotmail.com>
This is nicer than using a dictionary. At this moment I have to define
class generic: def __init__(self): pass
Not really bothersome, but is there a more straightforward way of doing it?
Sure: class generic: pass :-) Seriously, though, if you're just using it as a container, this isn't that bothersome. I once proposed a syntax on comp.lang.python which would allow you to write: object g: a = 3 instead of g = generic() g.a = 3 ...and it was greeted with a general shrug and the killing observation that it would require adding a new keyword. Cheers, Evan @ digicool