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)
| 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 |