133794m3r / 133794m3r/text_adventure
Modify the module import to use try except.
- Vorherrschende Sprache
- Python
- Sterne
- 1
- Forks
- 1
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.