Implements ``callable`` using ctypes (useful on CPython 3.0 and 3.1).
Implements callable using ctypes (useful on CPython 3.0 and 3.1, which is missing the callable function).
This library’s version numbers follow the SemVer 2.0.0 specification.
pip install ctypes-callable
The use-case for using this module is if:
- You are using an early CPython 3 release missing callable.
- You cannot upgrade to a newer CPython 3 for some reason.
- You want to use code which uses the callable builtin.
To do this, run this before any code that uses callable (for example, usercustomize or sitecustomize might be good places):
import ctypes_callable import builtins builtins.callable = ctypes_callable.callable
This module will fail on import on Jython, IronPython, PyPy, MicroPython, PyPy.js, Brython, Transcrypt, and probably any other implementation besides CPython, because it relies on accessing the Python C API through ctypes.
If you’re looking for something that’s basically this, but won’t break upon import on other Python implementations, you can use polyfill-callable.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size ctypes_callable-1.0.2-py2.py3-none-any.whl (3.4 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View|
|Filename, size ctypes-callable-1.0.2.tar.gz (2.6 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for ctypes_callable-1.0.2-py2.py3-none-any.whl