__autoinit__ (Was: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code)

Bengt Richter bokr at oz.net
Mon Jul 11 11:48:30 EDT 2005


On Mon, 11 Jul 2005 01:44:07 -0400, "Terry Reedy" <tjreedy at udel.edu> wrote:

>
>"Bengt Richter" <bokr at oz.net> wrote in message 
>news:42d1d71e.340825300 at news.oz.net...
>> Me too. I liked the leading _, but on second thought it is a weird 
>> language change
>> re names in a special context. Probably not so good.
>
>To repeat: while my '_' proposal could have been for a language change (in 
>3.0), it was actually for a convention recognized by a metaclass or, more 
>likely, decorator (and implementable now, I think).  *Any* flag would serve 
>the purpose, but I picked one that was a single char while being visually 
>striking and, as far as I know, rarely used in current practice even though 
>quite legal.  A 'self_' prefix would do as well except for being more to 
>type.  The prefix could even be an argument to the decorator!
>
Yes, sorry, I should have read more carefully. Yours is the high ground ;-)

Regards,
Bengt Richter



More information about the Python-list mailing list