Separators inside a var name

Rainy andrei.avk at gmail.com
Mon Jun 9 19:29:38 CEST 2008


I have a stylistic question. In most languages words in var. name are
separated by underscores or cap letters, resulting in var names like
var_name, VarName and varName. I don't like that very much because all
3 ways of naming look bad and/or hard to type. From what I understand,
scheme can have variables like var-name. I'm curious about reasons
that python chose to disallow this. Another question I have is what
other languages allow this naming scheme? Were there any languages
that allowed space as a separator? What would be a practical way to
separate variables from keywords in that case? "some long variable
name", 'just a string', or maybe using 2 spaces: one var  +  other
var  +  third var ? I think being able to easy have very long names
for vars that are easy to type would be a fairly significant
advantage. I know I'm probably being too obsessive about this, but
that didn't stop me from posting. Comments?



More information about the Python-list mailing list