Re: PEP for module naming conventions

2011-03-17 Thread Mel
Tim Johnson wrote:

 I need to be better informed on naming conventions for modules.  For
 instance, I need to create a new module and I want to make sure that
 the module name will not conflict with any future or current python
 system module names.

COBOL in its golden years had a practice that reserved words were almost 
never hyphenated -- the few that were could be counted on the fingers of 
perhaps four hands and were mostly required paragraph names that were always 
used and hard to forget.

It might turn out well to specify that system module names will never 
contain more than, say, one underscore.  That way, nice descriptive 
application module names like 'analyzer_tool_utils' and such would always be 
safe to use.

Mel.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PEP for module naming conventions

2011-03-17 Thread eryksun ()
On Friday, March 11, 2011 4:52:57 PM UTC-5, Tim Johnson wrote:
 I need to be better informed on naming conventions for modules.  For
 instance, I need to create a new module and I want to make sure that
 the module name will not conflict with any future or current python
 system module names.

Do you mean package names? Within a package you can use relative imports to 
avoid conflicts. You could put all of your packages in a metapackage namespace 
with a unique name -- a company/group name or personal/family name, an uncommon 
English word, or something from another language.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PEP for module naming conventions

2011-03-17 Thread Jonathan Gossage
I have found this approach problematic if you have packages separately
developed and maintained in different directory trees, resulting in
more than one PYTHONPATH entry with the same root metapackage name.
What happens is that only the first entry in the PYTHONPATH containing
the metapackage name is looked in for package/module resolution. Do
you have any suggestions for handling this kind of packaging?


On Thu, Mar 17, 2011 at 12:17 PM, eryksun () eryk...@gmail.com wrote:
 On Friday, March 11, 2011 4:52:57 PM UTC-5, Tim Johnson wrote:
 I need to be better informed on naming conventions for modules.  For
 instance, I need to create a new module and I want to make sure that
 the module name will not conflict with any future or current python
 system module names.

 Do you mean package names? Within a package you can use relative imports to 
 avoid conflicts. You could put all of your packages in a metapackage 
 namespace with a unique name -- a company/group name or personal/family name, 
 an uncommon English word, or something from another language.
 --
 http://mail.python.org/mailman/listinfo/python-list

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PEP for module naming conventions

2011-03-13 Thread Ben Finney
Tim Johnson t...@johnsons-web.com writes:

 I need to be better informed on naming conventions for modules. For
 instance, I need to create a new module and I want to make sure that
 the module name will not conflict with any future or current python
 system module names.

You'll never be able to make sure of that, and you would be needlessly
eliminating a whole lot of potentially useful names for your modules.

Have you read and understood PEP 328, which introduces the distinction
between relative and absolute imports? It's designed to avoid the
problem your describing URL:http://www.python.org/dev/peps/pep-0328/.

 There may be a PEP for this, if so, a URL to such a PEP would suffice
 for my inquiry. Also, if there is an index of PEPs, a link to such
 would also be appreciated.

PEP 0 is the index of all PEPs
URL:http://www.python.org/dev/peps/pep-/.

-- 
 \ “Pinky, are you pondering what I'm pondering?” “I think so, |
  `\   Brain, but if we have nothing to fear but fear itself, why does |
_o__) Elanore Roosevelt wear that spooky mask?” —_Pinky and The Brain_ |
Ben Finney
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PEP for module naming conventions

2011-03-13 Thread Tim Johnson
* Ben Finney ben+pyt...@benfinney.id.au [110313 17:15]:
 Tim Johnson t...@johnsons-web.com writes:
 
  I need to be better informed on naming conventions for modules. For
  instance, I need to create a new module and I want to make sure that
  the module name will not conflict with any future or current python
  system module names.
 
 You'll never be able to make sure of that, and you would be needlessly
 eliminating a whole lot of potentially useful names for your modules.
 
 Have you read and understood PEP 328, which introduces the distinction
 between relative and absolute imports? It's designed to avoid the
 problem your describing URL:http://www.python.org/dev/peps/pep-0328/.
 Have read, don't fully understand, but it sounds like the dust
 hasn't settled yet. It will sink in.
 thanks
 tim

  There may be a PEP for this, if so, a URL to such a PEP would suffice
  for my inquiry. Also, if there is an index of PEPs, a link to such
  would also be appreciated.
 
 PEP 0 is the index of all PEPs
 URL:http://www.python.org/dev/peps/pep-/.
 
 -- 
  \ “Pinky, are you pondering what I'm pondering?” “I think so, |
   `\   Brain, but if we have nothing to fear but fear itself, why does |
 _o__) Elanore Roosevelt wear that spooky mask?” —_Pinky and The Brain_ |
 Ben Finney
 -- 
 http://mail.python.org/mailman/listinfo/python-list

-- 
Tim 
tim at johnsons-web.com or akwebsoft.com
http://www.akwebsoft.com
-- 
http://mail.python.org/mailman/listinfo/python-list


PEP for module naming conventions

2011-03-11 Thread Tim Johnson
I need to be better informed on naming conventions for modules.  For
instance, I need to create a new module and I want to make sure that
the module name will not conflict with any future or current python
system module names.

There may be a PEP for this, if so, a URL to such a PEP would
suffice for my inquiry. Also, if there is an index of PEPs, a link
to such would also be appreciated.

thanks
-- 
Tim 
tim at johnsons-web.com or akwebsoft.com
http://www.akwebsoft.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PEP for module naming conventions

2011-03-11 Thread David Marek
Hi,

Have you read PEP 8? http://python.org/dev/peps/pep-0008/
I don't think it's possible to be sure that the name of your module
won't conflict with system module name (if you'll follow conventions).

You can find the list of all PEPs at http://python.org/dev/peps/

-- 
David Marek
dav...@atrey.karlin.mff.cuni.cz
http://davidmarek.cz


On Fri, Mar 11, 2011 at 10:52 PM, Tim Johnson t...@johnsons-web.com wrote:
 I need to be better informed on naming conventions for modules.  For
 instance, I need to create a new module and I want to make sure that
 the module name will not conflict with any future or current python
 system module names.

 There may be a PEP for this, if so, a URL to such a PEP would
 suffice for my inquiry. Also, if there is an index of PEPs, a link
 to such would also be appreciated.

 thanks
 --
 Tim
 tim at johnsons-web.com or akwebsoft.com
 http://www.akwebsoft.com
 --
 http://mail.python.org/mailman/listinfo/python-list

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PEP for module naming conventions

2011-03-11 Thread Tim Johnson
* David Marek dav...@atrey.karlin.mff.cuni.cz [110311 13:20]:
 Hi,
 
 Have you read PEP 8? http://python.org/dev/peps/pep-0008/
 I don't think it's possible to be sure that the name of your module
 won't conflict with system module name (if you'll follow conventions).
 
 You can find the list of all PEPs at http://python.org/dev/peps/
  Thank you for the links David.

 -- 
 David Marek
 dav...@atrey.karlin.mff.cuni.cz
 http://davidmarek.cz
 And interesting web site. The future is with us. 

 
 On Fri, Mar 11, 2011 at 10:52 PM, Tim Johnson t...@johnsons-web.com wrote:
  I need to be better informed on naming conventions for modules.  For
  instance, I need to create a new module and I want to make sure that
  the module name will not conflict with any future or current python
  system module names.
 
  There may be a PEP for this, if so, a URL to such a PEP would
  suffice for my inquiry. Also, if there is an index of PEPs, a link
  to such would also be appreciated.
 
  thanks
  --
  Tim
  tim at johnsons-web.com or akwebsoft.com
  http://www.akwebsoft.com
  --
  http://mail.python.org/mailman/listinfo/python-list
 

-- 
Tim 
tim at johnsons-web.com or akwebsoft.com
http://www.akwebsoft.com
-- 
http://mail.python.org/mailman/listinfo/python-list