This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Michael.Felt
Recipients Michael.Felt, vstinner
Date 2019-04-15.14:14:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <9049c4cb-27f0-c916-f272-42a9d43a4b7b@felt.demon.nl>
In-reply-to <1555321812.32.0.744796279635.issue36624@roundup.psfhosted.org>
Content
On 15/04/2019 11:50, STINNER Victor wrote:
> STINNER Victor <vstinner@redhat.com> added the comment:
>
> support.is_android has two flaws:
>
> * it's a constant: it must be spelled as UPPER CASE
> * I dislike "is_" prefix: "MS_WINDOWS" constant is commonly used, and it doesn't start with "is_".

I do not like the is_xxx form either, but I am low in the (name) picking
order. I like ALL_CAPS because it is easier to recognize as a constant,

I have the habit of using _ (underscore) before a name - but the clear
consensus is to not use that for constants coming from support.test.

As to being 'backported', even manually - that is something I would work
on. I am an old dog - and this seems like a good enough bone for me.

So, I'll finish up for AIX - except I would like to underline again
something I have come across a few times (but cannot find right now) -
and that is to base these constants not on the platform being built on,
but the platform being run on (i.e., platform.system()). I expect there
may be specific tests that are relevant during the build moment, or
perhaps, "later", when using something such as 'pip' to add a module.

As, relatively speaking, a new-comer to Python, I see this as a vast
improvement to the readability (and clarity) of the code.

As to new tests, modifications, etc. it will become part of the PR
review to be sure this becomes and stays the standard.

Anyway, I'll get started with AIX - not that many - and I hope with all
the constant definitions being moved to one place that should simplify
maintenance (and perhaps even back-porting).

>
> In my PR, I used support.ANDROID.
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue36624>
> _______________________________________
>
History
Date User Action Args
2019-04-15 14:14:32Michael.Feltsetrecipients: + Michael.Felt, vstinner
2019-04-15 14:14:32Michael.Feltlinkissue36624 messages
2019-04-15 14:14:32Michael.Feltcreate