[python-win32] Request for comments

Tim Golden mail at timgolden.me.uk
Sat May 24 21:12:04 CEST 2008


bob gailer wrote:
> Tim Roberts wrote:
>> bob gailer wrote:
>>>
>>> Please omit the space before ( in code. I find that very distracting. 
>>> Example:
>>>
>>> print result.Properties_ ("sValue").Value # current
>>>
>>> print result.Properties_("sValue").Value # preferred, and how most 
>>> code I've seen looks.
>>
>> Do you understand that this is strictly a personal preference?  Some 
>> people like it, some people don't.  You are certainly allowed to 
>> "prefer" one over the other, but it's a bit much to ask someone else 
>> to change their coding style to match yours, unless you are a paying 
>> client.  ;)
> 
> I agree. Please consider that all of the code examples I've seen in the 
> official Python documentation have no space before the (. Most newcomers 
> to Python who goes thru the tutorial will learn that way of coding. I 
> imagine it would be confusing for them to later see code with the space. 
> Same true for Python cookbook. Follow Tim's link to Windows Registry 
> Functions 
> <http://msdn.microsoft.com/en-us/library/ms724875%28VS.85%29.aspx>. MS's 
> examples. Ditto. I'm aiming for consistency, and minimal confusion for 
> many.

It's a fair point. For now (basically because I can do it faster)
I'll go with my spaces-before convention. When I get a chance to
breathe we can revisit this and other other coding style issues.
All the example code is in individual Python files so a global
search-and-replace should be possible if it becomes desirable.

[... snip description of problems with the PythonWin interpreter ...]

Yes, I tried that to see what you meant. I'm not sure there's
much I'm going to be able to do about that, unless someone
jumps in with a solution. My main point about the examples is
that they're self-contained. (ie you don't need to prearrange
any data or install any modules unless indicated). The ability
to drop them into a Python interpreter window is a nice-to-have
which I make use of whenever I'm posting code.

If anyone can suggest anything here, even in the form of a hint
in the docs, please let me know.

Thanks for your continued interest, Bob.

TJG


More information about the python-win32 mailing list