empty classes as c structs?

Nick Coghlan ncoghlan at iinet.net.au
Tue Feb 8 04:43:09 EST 2005


Steven Bethard wrote:
> I wonder if it would be worth adding a descriptor that gives a warning 
> for usage from instances, e.g.:

Thinking about it some more, I realised that a class method approach means that 
'type(self).method(self,...)' still works as a way to spell the call in a 
polymorphism friendly way.

And if we're going to have to spell the call that way *anyway*. . .

So maybe it does make sense to simply say that all non-magic Bunch/namespace 
operations are implemented as class methods (and most magic methods are 
effectively treated as class methods when it comes to looking them).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at email.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://boredomandlaziness.skystorm.net



More information about the Python-list mailing list