One of the things I'd like to point out here is
what we've been learning in new job during
Induction Training...

That is, it's part of the coding standard and
design standards to name variables sensibly.

For instance, naming a variable "db" when it's
really a "database" object is a no no. Instead
you should be naming it "db".

Another example, "db_id" vs. "database_id".

So my point here is that you should not really/ideally
be naming variables with such short un-meaningful
names such as "as", "if", "id", "xs" or what not.

Readability of your code becomes very important
especially if you're working with many developers
over time.

1. Use sensible meaningful names.
2. Don't use abbreviations.

cheers
James

On Thu, Dec 4, 2008 at 8:43 PM, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Thu, 4 Dec 2008 01:28:56 -0800, "Warren DeLano" <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>> In addition, note that my choice of a concise method identifier affects
>> only my users.  Python's introduction of a new keyword affects the
>> entire Python world code base, so perhaps you should be directing your
>> "choose better names" criticism in another direction?
>>
>        Dropping in...
>
>        If a "chosen name" mirrors a syntactic element -- whether reserved
> or not -- I'd consider that name potentially ambiguous or conflicted.
>
>        While "if" has been long a reserved word, I can as easily see
> someone using "if" as a shorthand name for "interface". And if "if" were
> not a reserved word, one might encounter code on the lines of
>
>        if = if + 1
>
> which is quite obnoxious to my eyes... or maybe
>
>        if if.connected:
>                if.close()
>
>
>        Since
>
>        import x as y
>
> has been a syntactic capability for some time, even if not reserved, I'd
> have avoided using "as" as anything other than that usage...
> --
>        Wulfraed        Dennis Lee Bieber               KD6MOG
>        [EMAIL PROTECTED]           [EMAIL PROTECTED]
>                HTTP://wlfraed.home.netcom.com/
>        (Bestiaria Support Staff:               [EMAIL PROTECTED])
>                HTTP://www.bestiaria.com/
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
--
-- "Problems are solved by method"
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to