python / python/cpython

Eliminate duplication of the check for the MS_WINDOWS macro.

Open
#138,206 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

interpreter-core type-refactor
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

I think there is no need to check for MS_WINDOWS macro twice here.

https://github.com/python/cpython/blob/bbcb75c986c47887e6c0757e63d59cd7af544f39/Python/pythonrun.c#L34-L43

Linked PRs
  • gh-138207

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at Python/pythonrun.c lines 34-43 and compare the two MS_WINDOWS checks. Review linked PR gh-138207; done means the duplicate check is eliminated without changing platform-specific behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, python
Domain
compilers
Issue type
Refactor
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.