Naming Conventions, Where's the Convention Waldo?

Günther Dietrich gd.usenet at spamfence.net
Sun Jul 11 04:03:27 EDT 2010


rantingrick <rantingrick at gmail.com> wrote:

>Another source of asininity seems to be the naming conventions of the
>Python language proper! True/False start with an upper case and i
>applaud this. However str, list, tuple, int, float --need i go
>on...?-- start with lowercase.
>
>Q: Well what the hell is your problem Rick. Who cares right?
>
>WRONG, I tell you what my problem is. Now i cannot "wisely" use
>variables like...
>
>str="this is a string"
>list = [1,2,3]
>def make_random_objs(range=10)
>def show_message(str)
>int = 12

Someone who wants to write readable and maintainable code would 
(practically) never want to use variables named in this way. Why? 
Because these names don't tell anything about the purpose of the 
variables.
So, it is not a disadvantage that the functions you listed above are 
named in this way. In the contrary, it is an advantage, as it keeps 
newcomers from using stupid variable names.


>If we would have adopted proper naming conventions from dios numero
>uno all this nonsense would be rectified! Str, Float, List, Range,
>etc, etc. You think Python 3000 was a hump to climb over just wait for
>Python 4000.

Additionally to what I mention above, there is PEP 0008. Read it, you 
can learn from it. What you listed above, are functions, and their names 
comply completely with PEP 0008.



Regards, 

Günther




PS: Even though I suspect that you are simply an agitator rsp. troll 
(based on what you posted in this group so far), and normally I refuse 
to feed trolls, I make an exception in this case, so newcomers ar not 
mislead by your half-baked ideas.



More information about the Python-list mailing list