[Tutor] I know you will hate this but...

Smith, Jeff jsmith at medplus.com
Tue May 17 20:03:29 CEST 2005


From: tutor-bounces at python.org [mailto:tutor-bounces at python.org] On
Behalf Of Andrei
>It seems problematic to me to NOT enforce standard *settings* (e.g. 4
spaces   
>per indentation level, no tabs). Any IDE can be used as long as the
proper   
>settings are configured. Inconsistent indentation styles are very
annoying in   
>other languages, but a fatal problem in Python.   

But there is no way to enforce standard settings.  When new versions are
installed or someone just makes a mistake the settings might change and
you won't know until it's too late...possibly weeks later.

   
>Weird. Looks to me like the wrong solution (it would IMO be better to
find out 
>who committed the broken code and work from there to find the cause),
but 
>whatever works for you.   

I agree I don't like it much either, but finding out who broke the code
doesn't prevent the problem from happening again.  My plan is to
eventually produce a tool that will verify that this coding standard is
met which allows us to recover the logical structure should this happen
on an ongoing basis.  

   
>I haven't, but I use Subversion and haven't done team development in
Python. 
>But I don't think any half-decent VCS should go around modifying code
on its 
>own in *any* way, even if it's spaces. Although, now that I think about
it, a 
>VCS might have an option of ignoring leading/trailing whitespace when
doing 
>diffs, such an option could bite when merging Python code. 
 
Every CMS I've used modified code in some way.  CVS, RCS, VSS, Perforce,
and Subversion support the use of keywords.  All of these tools, as well
as Clearcase have merge tools to merge changes between branches in an
automated way.  At the core level, all these tools work by tearing apart
the source and saving the diffs between revisions and then putting them
back together again when a specific revision is requested.  Sure you
hope it's the same as it was in the beginning but there's always a
chance for error.

I don't know where the error was introduced in my case, It's either the
PyWin settings or the Perforce merge tool.  I have control over one but
not the other.  In either case, we need a system that can allow us to
recover from this situation when it happens.

Jeff


More information about the Tutor mailing list