Long names are doom ?

Rainy sill at optonline.net
Sat May 26 10:20:53 EDT 2001


On Sat, 26 May 2001 00:51:42 -0600, Andrew Dalke <dalke at acm.org> wrote:
> Nick Perkins wrote:
>>what if you wanted to name, say, a function
>>with a string so that you could include spaces?
>  ...
>>...just a silly idea.
>>ok, i'll go to bed now.
> 
> Something like that came up last year, with
> the proposed syntax of
> 
>   obj."attribute with spaces in the name"
> 
> As I recall, people thought it interesting, but that's
> as far as it went.  I don't think there were any
> definite implementation reasons against it.  But no one
> could get a solid reason to have it, and for those
> few cases where that functionality was needed
> 
>   getattr(obj, "attribute with spaces in the name")
> 
> works.
> 
> BTW, in your proposal,
>   fn['my special function']()
> 
> the [] syntax could be confused with list/dict lookup.
> 
>                     Andrew
>                     dalke at acm.org

What's the big problem with implementing this:

my varibable = 2

my result = my variable * 3

def my function(some variable):
    return some variable / 8

?

I know there is something seriously wrong with this, because otherwise
it'd be done already in some language (and afaik it isn't). So what
exactly is wrong? I'm asking because typing up a name with underscores
feels_awkward and separatingByCapitalLettersLooksAwkward. I can't remember
any situation where a space is needed to separate one variable from another,
and syntax characters aren't allowed in variable names.. What am I missing
here? :-)

> 
> 
> 


-- 
Lucifer Sam Siam cat
Always sitting by your side
Always by your side
That cat's something I can't explain
        - Syd



More information about the Python-list mailing list