classes and sub classes?
Neil Cerutti
neilc at norwich.edu
Mon Apr 15 08:22:21 EDT 2013
On 2013-04-15, Peter Otten <__peter__ at web.de> wrote:
> Jason Friedman wrote:
>>> NwInvDb = NetworkInventoryDatabase, yes you are correct, it
>>> creates the database handle and makes it ready for use.
>>
>> I am interested in opinions. I for one dislike abbreviations
>> on the theory that programs are read more than they are
>> written. I would probably use this variable name:
>>
>> network_inventory_db_connection = ...
>>
>> And yes, I'm aware that "db" is an abbreviation. I believe I am following
>> a few Zen principles:
>>
>> Beautiful is better than ugly.
>> Explicit is better than implicit.
>> Readability counts.
>> Special cases aren't special enough to break the rules, Although
>> practicality beats purity.
>>
>> What would others use?
>
> inventory_db
>
> The rest should be clear from the context.
How long and descriptive a name is ought to depend on the
wideness of its visibility. n might be acceptable in a short
comprehension, while network_inventory_db_connection might be
apposite for a module-level name.
--
Neil Cerutti
More information about the Python-list
mailing list