__autoinit__ (Was: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code)
Terry Reedy
tjreedy at udel.edu
Mon Jul 11 01:44:07 EDT 2005
"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!
Terry J. Reedy
More information about the Python-list
mailing list