Created
May 22, 2024 07:39
-
-
Save 2tony2/5114ae0190022ee7b61032f1665f1ac3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from enum import Enum | |
| class Environment(Enum): | |
| DEVELOPMENT = "development" | |
| STAGING = "staging" | |
| PRODUCTION = "production" | |
| def set_environment(env: Environment) -> str: | |
| return f"Environment set to {env.value}" | |
| print(set_environment(Environment.DEVELOPMENT)) # Output: Environment set to development | |
| print(set_environment(Environment.PRODUCTION)) # Output: Environment set to production |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment