Skip to content

Commit 8ac9cf9

Browse files
committed
Merge pull request #29 from ifduyue/__version__
Also add __version__.
2 parents 9c564fb + b6a96a1 commit 8ac9cf9

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

README.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,17 @@ The library is pretty simple to use::
2727
True
2828
>>>
2929

30-
Methods
31-
=======
30+
Methods and Constants
31+
=====================
3232
The bindings provides some aliases too::
3333

3434
>>> import lz4
3535
>>> lz4.LZ4_compress == lz4.compress == lz4.dumps
3636
True
3737
>>> lz4.LZ4_uncompress == lz4.uncompress == z4.decompress == lz4.loads
3838
True
39+
>>> lz4.VERSION == lz4.__version__ # e.g. "0.7.0"
40+
True
3941
>>>
4042

4143
Is it fast ?

src/python-lz4.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ void initlz4(void)
203203
}
204204

205205
PyModule_AddStringConstant(module, "VERSION", VERSION);
206+
PyModule_AddStringConstant(module, "__version__", VERSION);
206207
PyModule_AddStringConstant(module, "LZ4_VERSION", LZ4_VERSION);
207208

208209
#if PY_MAJOR_VERSION >= 3

0 commit comments

Comments
 (0)