Striving for PEP-8 compliance
debatem1 at gmail.com
Wed Apr 7 11:10:32 EDT 2010
On Wed, Apr 7, 2010 at 10:53 AM, Tom Evans <tevans.uk at googlemail.com> wrote:
> [ Please keep me cc'ed, I'm not subscribed ]
> Hi all
> I've written a bunch of internal libraries for my company, and they
> all use two space indents, and I'd like to be more consistent and
> conform to PEP-8 as much as I can.
> My problem is I would like to be certain that any changes do not alter
> the logic of the libraries. When doing this in C, I would simply
> compile each module to an object file, calculate the MD5 of the object
> file, then make the whitespace changes, recompile the object file and
> compare the checksums. If the checksums match, then the files are
> Is there any way to do something semantically the same as this with python?
Probably the logical thing would be to run your test suite against
it, but assuming that's not an option, you could run the whole
thing through dis and check that the bytecode is identical. There's
probably an easier way to do this though.
More information about the Python-list