Created
December 26, 2022 11:59
-
-
Save hamaguchi-amago/a64a65986424a407cbe7429a90a07606 to your computer and use it in GitHub Desktop.
This file contains 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
import python_const_0 as Pt | |
Pt.MAX_TIME = 10 | |
Pt.METHOD = "GET" | |
def main(): | |
print(Pt.MAX_TIME) | |
print(Pt.METHOD) | |
# 代入できない | |
Pt.MAX_TIME = 10 | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ブログで作成しました。
【Python】プログラム中に定数を扱う注意点
https://neko-py.com/python-constants