Xavier de Gaye added the comment:

@Ned
The information that the interpreter is an Android built, is needed in issue 
16353 [1][2]. In msg266135, the corresponding patch adds the 'is_android' 
attribute to the already bloated sys module. I had thought then about using 
sysconfig.get_config_var() as you are suggesting, but this means that the os 
module would need now to import sysconfig on all linux platforms and build this 
big dictionary (about 650 entries on linux).

So it seems that the choice is between:
(1) adding an attribute (is_android or android_api) to the bloated sys module
(2) bloating sys.implementation with platform-specific data

I think that (2) would be better since _android_api is an information about the 
implementation, it tells that in these binaries, such and such features are 
available or not (issue 26857 for example). The drawback is that it would not 
be documented except in Misc/NEWS [2].

@Victor
Do you mean a public attribute of sys.implementation ?
Adding a new sys.implementation required attribute is described in pep 421. In 
that case the attribute name could be 'libc_version' or 'libc'.

[1] msg175006 suggested another approach though, but this seems to be abandoned.
[2] For completeness, Stefan has submitted a feature request to google in 
msg266089.

----------
nosy: +skrah

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

Reply via email to