Skip to content

fix: remove unnecessary global statement in Reverse-Hangman-Game.py#1635

Open
ashrion wants to merge 1 commit into
steam-bell-92:mainfrom
ashrion:fix/reverse-hangman-remove-unnecessary-globals
Open

fix: remove unnecessary global statement in Reverse-Hangman-Game.py#1635
ashrion wants to merge 1 commit into
steam-bell-92:mainfrom
ashrion:fix/reverse-hangman-remove-unnecessary-globals

Conversation

@ashrion

@ashrion ashrion commented Jul 11, 2026

Copy link
Copy Markdown

Summary

Removed unnecessary global statement from Reverse-Hangman-Game.py. The function declared 15 variables as global but none are used outside main().

Changes

  • Removed global attempts_left, choice, frequency, guess, guessed_letters, i, length, letter, pattern, pattern_list, possible_words, remaining, target_word, valid, word, wrong_letters

How to Test

  1. Run python games/Reverse-Hangman-Game/Reverse-Hangman-Game.py
  2. Play a few rounds to verify game works correctly
  3. Confirm no NameError or behavior changes

Related Issues

Fixes #1634

GSSoC 2026

Removed 15-variable global declaration from main() since all variables
are local and never accessed outside the function.

Fixes steam-bell-92#1634
@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

@ashrion is attempting to deploy a commit to the Anuj's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: remove unnecessary global statement in Reverse-Hangman-Game.py

1 participant