Skip to main content
Build status

pydiff diffs Python code at the bytecode level. This is useful for checking for changes to the actual code structure while ignoring formatting changes.

Installation

From pip:

$ pip install --upgrade pydiff

Example

foo.py:

import os, sys
def main():

    x = len(sys.argv) + 100

    y            = x+77
    print(y)

bar.py:

import os
import sys


def main():
    x = len(sys.argv) + 101
    y = x + 77
    print(y)

$ pydiff foo.py bar.py:

---
+++
@@ -4,7 +4,7 @@
                None,
                {'co_argcount': 0,
                 'co_cellvars': (),
-                'co_consts': [None, 100, 77],
+                'co_consts': [None, 101, 77],
                 'co_flags': 67,
                 'co_freevars': (),
                 'co_kwonlyargcount': 0,

Release files for pydiff 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydiff 0.2
File Size Uploaded
pydiff-0.2.tar.gz 4.1 kB Details

Release files / pydiff-0.2.tar.gz

Download URL pydiff-0.2.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
847c7121625de8d5aa9eb2b079edad18a451e134cafa1b8958ea019ee0409aaa
BLAKE2b-256 checksum
How to use checksums
e4fd7d0c657a640e7329a4112deb437f43a84e07f1b935efe4c1e34bc356194f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2 This release

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page