[Python-ideas] keywording prohibited

Adam Atlas adam at atlas.st
Sun May 3 04:28:47 CEST 2009


On 2 May 2009, at 21:16, spir wrote:
> I have (painfully) learnt a reflex to use 'ranj' for range, 'Seq'  
> for list, 'typ' for type, etc...
> But maybe its me and I'm the only one ;-)

Isn't the convention to suffix a name with an underscore when it would  
clash with a builtin? (range_, list_, type_, etc.)

I'm not sure how much I like that stylistically, but I've seen it used  
a lot. (I think in some cases there are better alternatives -- e.g.  
instead of naming a variable "seq" or "list_", I'd have the name  
specify what it's a list *of*.)



More information about the Python-ideas mailing list