Question 50
In a controlled system change, the engineer encounters: A Linux admin commits generated __pycache__ files into a shared project repository. Which implementation step BEST resolves it?
Explanation
Correct Answer
The fix addresses the cause: generated bytecode may be platform/version-specific and unnecessary in source control. A suitable acceptance test is that clean checkout rebuilds caches without versioning them.
Incorrect Answers
That remedy is appropriate when a dependency install succeeds using pip but another Python interpreter cannot import it. It targets pip must be bound to the intended interpreter or environment; here generated bytecode may be platform/version-specific and unnecessary in source control, so it does not directly repair the observed fault.
It would correct a separate failure, a tool writes JSON status files by concatenating Python dict string representations. In this environment, generated bytecode may be platform/version-specific and unnecessary in source control; the indicated alternative does not meet the acceptance test.
That remedy is appropriate when a script needs to map hostnames to IP addresses but uses a list of alternating values. It targets python dictionaries map keys to values for direct lookup; here generated bytecode may be platform/version-specific and unnecessary in source control, so it does not directly repair the observed fault.





CompTIA Linux+ (XK0-006) Practice Tests