CamelCase versus wide_names (Prothon)

Max M maxm at mxm.dk
Tue Apr 20 08:11:14 EDT 2004


Max M wrote:

> Make . a normal letter.
> 
> And make _ have the function that . has in Python, so that _ and . sort 
> of switches meaning.
> 
> Anybody in hteir right mind can see that, that is a good idea:

Oh I forgot to include a good example:


def install.sub.skin(self, out, skin.folder):
     """Install a subskin"""

     skins.tool = get.tool.by.name(self, 'portal.skins')

     for skin in skins.tool_get.skin.selections():
         path = skins.tool_get.skin.path(skin)
         path = map(string_strip, string_split(path,','))
         if not skin.folder in path:
             try:
                 path_insert(path_index('custom')+1, skin.folder)
             except value.error:
                 path_append(skin.folder)
             path = string_join(path, ', ')
             skins.tool_add.skin.selection(skin, path)
             out_write('Subskin successfully installed into %s\n' % 
skin)
         else:
             out_write('*** Subskin was already installed into %s\n' % 
skin)


It is allmost freakish how hard that is to read.

On a more serious not though, what about a special notation for variables:

_this is a variable_ = 'Some string'
`Or this is a variable` = 'Some other string'

Is that to hard to read? I guess that the backtick is. It is certainly 
easier to type on my Danish keyboard.


regards Max M



More information about the Python-list mailing list