[Python-Dev] Restricted API versioning (original) (raw)
Chris Angelico rosuav at gmail.com
Sun Jun 24 01:44:55 CEST 2012
- Previous message: [Python-Dev] Restricted API versioning
- Next message: [Python-Dev] Restricted API versioning
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Jun 24, 2012 at 9:40 AM, Christian Heimes <lists at cheimes.de> wrote:
+1 for the general idea and for using PyLIMITEDAPI. I still like my idea of a simple macro based on Include/patchlevel.h, for example:
_#define PyAPIVERSION(major, minor, micro) _ (((major) << 24) | ((minor) << 16) | ((micro) << 8))_ _#if PyLIMITEDAPI+0 >= PyAPIVERSION(3, 3, 0) #endif
This strikes me as in opposition to the Python-level policy of duck typing. Would it be more appropriate to, instead of asking if it's Python 3.3.0, ask if it's a Python that supports PY_FEATURE_FOOBAR? Or would that result in an unnecessary proliferation of flag macros?
ChrisA
- Previous message: [Python-Dev] Restricted API versioning
- Next message: [Python-Dev] Restricted API versioning
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]