
As you know, the current Python source tree contains a mixture of various different tab/space conventions and source formatting styles. The Python community has opted not to perform any sort of mass conversion of source file to a uniform style, because the community values time-wise consistency (of versions and branches) over space-wise consistency (between files in the same revision). However, I have often wondered if it would be reasonable to reformat *all prior* versions of the source code. Imagine some kind of tool that would iterate over all previous versions, copying each version from one repository to another, and doing an automatic reformat on each version. Of course, in order for this to work, the automatic reformatter would have to be very, very trustworthy, since any errors would likely go undetected for a long time. One objection to this plan is that the history thus created would be "revisionist" - that it would be, in fact, an unauthentic historical record of what had happened. I don't have a good answer to that other than to say that this is an argument of theory over practicality. In any case, I don't mean this as a serious suggestion that we reformat all Python revisions in the current SVN repository. However - since we're going to be setting up a new DVCS anyway, I wonder if something along these lines would make sense as part of the migration. It might be a one-time opportunity to deal with this matter once and for all. -- Talin

Talin wrote:
I think the folks working out the mechanics of the migration are going to have enough to sort out without worrying about tab/space differences in the C code. Now, if someone could work out a way to do a hg diff that paid attention to leading whitespace differences in .py and .rst files (where it matters), but ignored all other whitespace only changes, then that would be a useful tool in its own right (since it would be applicable to any project with a mixed Python/non-Python source tree). Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia ---------------------------------------------------------------

Talin wrote:
I think the folks working out the mechanics of the migration are going to have enough to sort out without worrying about tab/space differences in the C code. Now, if someone could work out a way to do a hg diff that paid attention to leading whitespace differences in .py and .rst files (where it matters), but ignored all other whitespace only changes, then that would be a useful tool in its own right (since it would be applicable to any project with a mixed Python/non-Python source tree). Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia ---------------------------------------------------------------
participants (2)
-
Nick Coghlan
-
Talin