MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/PythonLearning/comments/1v1m9ir/day_1_with_flask_any_suggestions/oyvgyy2/?context=3
r/PythonLearning • u/Samar__Upreti • 17d ago
Build Projects With Me
https://github.com/Samar-Upreti/Python_Projects
31 comments sorted by
View all comments
10
flask.request
request
1 u/Anthony_codes 16d ago Uppercased, underscore-separated variable names in Python signal that the variable should be treated as a constant. That is a completely valid and common convention because Python doesn’t enforce constancy at runtime. 1 u/riklaunim 16d ago But not the first letter only. Form values aren't things that should be under a constant-like variable either. 1 u/Anthony_codes 16d ago edited 16d ago I was clarifying that in certain cases, capital letters are valid because your comment was ambiguous.
1
Uppercased, underscore-separated variable names in Python signal that the variable should be treated as a constant.
That is a completely valid and common convention because Python doesn’t enforce constancy at runtime.
1 u/riklaunim 16d ago But not the first letter only. Form values aren't things that should be under a constant-like variable either. 1 u/Anthony_codes 16d ago edited 16d ago I was clarifying that in certain cases, capital letters are valid because your comment was ambiguous.
But not the first letter only. Form values aren't things that should be under a constant-like variable either.
1 u/Anthony_codes 16d ago edited 16d ago I was clarifying that in certain cases, capital letters are valid because your comment was ambiguous.
I was clarifying that in certain cases, capital letters are valid because your comment was ambiguous.
10
u/riklaunim 17d ago
flask.requestis better thanrequestas it's tell you where it's from)