From 1b4a85676726cd687e0953895c79ef364d19e09f Mon Sep 17 00:00:00 2001 From: Aniket Singh Yadav Date: Tue, 16 Sep 2025 10:41:56 +0530 Subject: [PATCH 1/4] Add a note to the platform.machine() documentation section --- Doc/library/platform.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst index 37df13f8a1eb8c..3a48668ff72325 100644 --- a/Doc/library/platform.rst +++ b/Doc/library/platform.rst @@ -56,6 +56,13 @@ Cross platform Returns the machine type, e.g. ``'AMD64'``. An empty string is returned if the value cannot be determined. + .. note:: + + The output of :func:`platform.machine` is system-dependent and may differ in casing + and naming conventions across platforms. For example, on Apple Silicon macOS it may + return ``'arm64'`` (lowercase), while on Windows-on-ARM it may return ``'ARM64'`` (uppercase). + If you need consistent results, normalize the output in your code. + .. function:: node() From 08b07a24ec16cfc9bb5176f779a30e81a849ce2e Mon Sep 17 00:00:00 2001 From: Aniket Singh Yadav Date: Tue, 16 Sep 2025 14:29:20 +0530 Subject: [PATCH 2/4] Add a note to the platform.machine() documentation section --- Doc/library/platform.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst index 3a48668ff72325..e8b331eea67412 100644 --- a/Doc/library/platform.rst +++ b/Doc/library/platform.rst @@ -58,10 +58,11 @@ Cross platform .. note:: - The output of :func:`platform.machine` is system-dependent and may differ in casing - and naming conventions across platforms. For example, on Apple Silicon macOS it may - return ``'arm64'`` (lowercase), while on Windows-on-ARM it may return ``'ARM64'`` (uppercase). - If you need consistent results, normalize the output in your code. + The output of :func:`platform.machine` is system-dependent and may differ + in casing and naming conventions across platforms. For example, on Apple + Silicon macOS it may return ``'arm64'`` (lowercase), while on Windows-on-ARM + it may return ``'ARM64'`` (uppercase). If you need consistent results, + normalize the output in your code. .. function:: node() From 5d1679cfa3f5d2d6fb68b6f4499ffd22ad539515 Mon Sep 17 00:00:00 2001 From: Aniket <148300120+Aniketsy@users.noreply.github.com> Date: Tue, 16 Sep 2025 15:28:56 +0530 Subject: [PATCH 3/4] Update Doc/library/platform.rst Co-authored-by: AN Long --- Doc/library/platform.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst index e8b331eea67412..0ccf45f5678f90 100644 --- a/Doc/library/platform.rst +++ b/Doc/library/platform.rst @@ -60,7 +60,7 @@ Cross platform The output of :func:`platform.machine` is system-dependent and may differ in casing and naming conventions across platforms. For example, on Apple - Silicon macOS it may return ``'arm64'`` (lowercase), while on Windows-on-ARM + Silicon based macOS it may return ``'arm64'`` (lowercase), while on Windows-on-ARM it may return ``'ARM64'`` (uppercase). If you need consistent results, normalize the output in your code. From 447ac2d10175e7c02d6e5fb965af68d9c97b1e6e Mon Sep 17 00:00:00 2001 From: Aniket Singh Yadav Date: Wed, 17 Sep 2025 19:29:05 +0530 Subject: [PATCH 4/4] Doc: Simplify platform.machine() documentation and clarify output differences --- Doc/library/platform.rst | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst index e8b331eea67412..e5c3ae59f7a858 100644 --- a/Doc/library/platform.rst +++ b/Doc/library/platform.rst @@ -56,13 +56,7 @@ Cross platform Returns the machine type, e.g. ``'AMD64'``. An empty string is returned if the value cannot be determined. - .. note:: - - The output of :func:`platform.machine` is system-dependent and may differ - in casing and naming conventions across platforms. For example, on Apple - Silicon macOS it may return ``'arm64'`` (lowercase), while on Windows-on-ARM - it may return ``'ARM64'`` (uppercase). If you need consistent results, - normalize the output in your code. + The output is platform-dependent and may differ in casing and naming conventions. .. function:: node()