473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Names for modules and functions

This just might be the weirdest question you have heard yet but what is a good way to come up with
names for modules, function, etc.?

I am trying to come up with meaningful names but keep feeling like I have a new puppy I have to name
(and I was never good at that, either. My dog's name is Buddy).

So, are there any guidelines?

Also, is it ok to name a module and function the same?

--- EnterName.py ---
def EnterName():
...
--- End ---

Jeff
Jul 18 '05 #1
1 1259
On Tue, 02 Dec 2003 05:18:15 +0000, Jeff Wagner wrote:
... what is a good way to come up with names for modules, function,
etc.? I am trying to come up with meaningful names but keep feeling
like I have a new puppy I have to name (and I was never good at that,
either. My dog's name is Buddy).
I like 'Buddy' :-)

So, are there any guidelines?
To google for 'naming conventions' resp. 'naming scheme' or 'style
guide' might help; but in general, you will only find stuff like 'use
underscores', 'don't use underscores', 'use camel notation', 'don't
use camel notation' etc. and something on the order resp. use of
nouns, verbs etc. (e.g. 'showXmlData' vs. 'XmlDataShow')

You might also want to have a look at the 'Style Guide for Python
Code' by Guido van Rossum and Barry Warsaw:

http://www.python.org/peps/pep-0008.html

(But it does not really help in your special situation :-)

Also, is it ok to name a module and function the same?


Often you will see that a module and its class have the same name
(if the module contains just one class).

Finally, it might help to look at the naming conventions for other
languages. E.g. for C#/.NET you will find very detailed instructions
on how to name stuff (Google, Microsoft website).

HTH, L.

--
mailto: logan@phreaker(NoSpam).net

Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: saidev | last post by:
A quick question, I'm about to recompile PHP, last time I compiled it with alot of modules, thinking that this time I should not need that many. Is there any tool(s) that could run under the...
6
by: Hung ho | last post by:
Hi. I just finished reading an introductory Python book called "Python Programming for the absolute beginner" by Michael Dawson. I found it very interesting, and easy to follow. Python does really...
6
by: Mayer | last post by:
Hello: Is there a way to see at the python prompt the names of all the public methods of a class or the names exported by a module? I know that GUI-based IDEs have a nifty way of displaying...
1
by: Andrew Poulos | last post by:
If I'm writing a sizeable chunk of javascript (1000s of lines) and it includes lots of custom functions, global variables, prototypes etc is there an agreed, customary, conventional, or best...
4
by: Leon | last post by:
Hi! Is it possibile to get names and types of functions, subs and variables included in modules and forms VB code? The reason - I must to create documentation of application. I would to...
7
by: Lauren Quantrell | last post by:
At running the risk of asking how big is too big... Is there a rule of thumb or a best practice that says I may have too many modules? I currently have a Access2K app with about 30 code modules,...
66
by: Mike Meyer | last post by:
It seems that the distinction between tuples and lists has slowly been fading away. What we call "tuple unpacking" works fine with lists on either side of the assignment, and iterators on the...
7
by: Petr Jakes | last post by:
I have got names of functions stored in the file. For the simplicity expect one row only with two function names: printFoo, printFOO In my code I would like to define functions and then to read...
4
by: srinivas | last post by:
hi friends i am new to python programming. i am using Python 2.5 and IDLE as editor. i have developed some functions in python those will be calling frequently in my main method . now i want to...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.