Proposal for removing self

Ravi Teja Bhupatiraju webraviteja at yahoo.com
Fri Aug 27 05:00:29 EDT 2004


"Sean Ross" <sross at connectmail.carleton.ca> wrote in message news:<gStXc.29013$DG.1381823 at news20.bellglobal.com>...
> "Ravi Teja Bhupatiraju" <webraviteja at yahoo.com> wrote in message
> > __readonly__ would be another nicety.
> 
> Well, you could use this for __readonly__ (though I named it 'readable()'):
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/157768
> 
> or if you want to use meta-classes (and this recipe does use __readonly__):
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/197965
> 
> There are many similar implementations floating around.
> 
> As for removing self:
> http://starship.python.net/crew/mwh/hacks/selfless.py
> 
> Enjoy,
> Sean

Thanks Sean. This is interesting code. I should really learn about metaclasses.



More information about the Python-list mailing list