[prev in list] [next in list] [prev in thread] [next in thread]
List: python-dev
Subject: Re: [Python-Dev] The path module PEP
From: "Gustavo J. A. M. Carneiro" <gjc () inescporto ! pt>
Date: 2006-01-26 0:30:58
Message-ID: 1138235459.6668.14.camel () localhost ! localdomain
[Download RAW message or body]
On Wed, 2006-01-25 at 21:37 +0100, BJörn Lindqvist wrote:
> Renaming methods because of PEP 8 (Gustavo, Ian, Jason)> > I'm personally not keen \
> on that. I like most of the names as they> are. abspath(), joinpath(), realpath() \
> and splitall() looks so much> better than abs_path(), join_path(), real_path() and \
> split_all() in my> eyes. If someone like the underscores I'll add it to Open \
> Issues.
<PEP8> Function Names
Function names should be lowercase, with words separated by underscores as \
necessary to improve readability.
mixedCase is allowed only in contexts where that's already the prevailing \
style (e.g. threading.py), to retain backwards compatibility. Method Names and \
Instance Variables
Use the function naming rules: lowercase with words separated by \
underscores as necessary to improve readability.</PEP8> It is very clear. Whether \
you agree with PEP 8 or not is not relevantto this discussion. Since this is a \
completely new module, it should becorrectly named from the start. The "familiarity \
with os.path argument"is a very weak one, IMHO. Plus, the names are full of \
redundancy. Why abspath(), joinpath(),realpath(), splitall()? Why not instead: \
absolute(), join(), real(),split() ? Remember that they are all methods of a Path \
class, you don'tneed to keep repeating 'path' all over the place[1]. On a slightly \
different subject, regarding path / path, I think itfeels much more natural path + \
path. Path.join is really just a stringconcatenation, except that it adds a path \
separator in the middle ifnecessary, if I'm not mistaken. Best regards.
[1] Yes, I'm the kind of guy who hates struct timeval having tv_sec andtv_usec field \
members instead of sec and usec.
-- Gustavo J. A. M. Carneiro<gjc@inescporto.pt> <gustavo@users.sourceforge.net>The \
universe is always one step beyond logic \
_______________________________________________Python-Dev mailing \
listPython-Dev@python.orghttp://mail.python.org/mailman/listinfo/python-devUnsubscribe: \
http://mail.python.org/mailman/options/python-dev/python-dev%40progressive-comp.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic