Python version based conditionals
Project description
Nxpy_past provides ways to express conditions on the current Python version to help handling version differences:
import nxpy.core.past if nxpy.core.past.V_2_6.at_least(): import abc else: class abc(object): class ABCMeta(type): def __new__(mcs, name, bases, dict): return type.__new__(mcs, name, bases, dict)
It is also possible to express assertions on the current version to better document why some code fails:
import nxpy.core.past nxpy.core.past.enforce_at_least(nxpy.core.past.V_2_6)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nxpy_past-1.0.0.tar.gz
(2.4 kB
view hashes)
Built Distribution
Close
Hashes for nxpy_past-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aced31fde696875220ca6e0883e3201391988ef889ec0eff5e0cfe76896d342a |
|
MD5 | dcb144cb66e6ed483682b37b742c5ff8 |
|
BLAKE2b-256 | 0606d18c831d048cd34c9ad48c90c89b902c5b23f98716c9bcc879471600d6d3 |