Vernon,
Tim:
I think you missed my point...
As you say, the PEP8 style guide "is a starting point for new Python
coders."
That is precisely why it ought to be followed in sample code.
I normally format my function calls exactly the way you do, and I do
so in open source code which I contribute to the community. That is
not EXAMPLE code which also works, it is working code which might be
used as an example: a subtle but important difference.
--
Vernon Cole
I always find it interesting when people flip out over semantics like
this. This seems especially true when someone is trying to contribute
back to the community. I get flak every time I talk about my Python
Extension Building Network because people don't like executables and
think that everyone should use the command line. I admit that I have
found it personally discouraging when this happens, which is why my site
doesn't get updated regularly any more.
I'm sure I'll get some hate mail over my wxPython tutorials soon since I
use camelCase as Tim R. does. Oddly enough, this seems to be the
convention in the wxPython camp, which flies in the face of PEP8.
I guess I would recommend that you create a mirror site and reformat it
to the standards you use. Then Tim can link to your site too. I also
recommend that you read Aesop's Fable: "The Man, the boy and the donkey"
: http://members.cox.net/deleyd2/prose/aesop63.htm
Mike
On Wed, May 28, 2008 at 10:46 AM, Tim Roberts <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Vernon Cole wrote:
Let's not loose track of the thread here.
The question was whether there should be a space between the
function name and the leading parenthesis, as:
my_function (arg)
vs:
my_function(arg)
PEP8 clearly requires the latter.
PEP8 is a coding standard document for the Python standard
library. Nothing more. It is not a mandate for all Python code.
I disagree with several of the conventions in PEP8, although if I
ever submit anything to the standard library, I will reformat it
to match.
The key lesson in that PEP is that you should stick to SOME
standard. It need not be the same standard used by others.
IMHO any published example code, which is what we are talking
about here, should follow the PEP8 style guide.
No, that's going WAY too far. It is a mandate for the standard
library, and it is a starting point for new Python coders.
(Besides which I personally REALLY hate the extra space.)
You are entitled to do so. I don't like it either, but I will
certainly defend TJG's right to write his code using his own
standards. I, personally, like Camel-cased names with an extra
space inside the parentheses, both of which are discouraged by PEP8:
obj = myFunction( one, two )
--
Tim Roberts, [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Providenza & Boekelheide, Inc.
_______________________________________________
python-win32 mailing list
python-win32@python.org <mailto:python-win32@python.org>
http://mail.python.org/mailman/listinfo/python-win32
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32