133794m3r / 133794m3r/text_adventure

Modify the module import to use try except.

オープン
#12 コメント 0 件 リアクション 0 件 担当者 2 名 @rsd1244 が担当を希望しています GitHub で見る
enhancement good first issue
主要言語
Python
スター
1
フォーク
1
PR マージ指標
30日以内にマージされた PR はありません

説明

This issue will track if I"m already using try except if the module is already imported or not. It will avoid importing the same module over and over again since python does not let you do ifndef you have to wrap it in a try except block.

try:
module
except NameError:
import module

Do this for each module as it's being imported to see if we've not already gotten it. This way we can check if it's already there. This should've already been covered but SO guys didn't tell me how to do this which is what I wanted to do but oh well my hack needs to be fixed.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。