STINNER Victor added the comment:

> The version > 0 check was done because sysconfig.get_config_var() returns 0 
> when a variable is found as '#undef' in pyconfig.h.

Oh right, I see. In this case, we don't need to have a special case in 
sys.getandroidapilevel().

I pushed getandroidapilevel-3.patch with a change: I added a small unit test. 
It checks that level > 0. I hesitated to also check for a maximum, but I'm not 
sure that it makes sense.

Xavier: can please double test that sys.getandroidapilevel() works on Android? 
If it's the case, we can move on the issue #28596 :-)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28740>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to