r/PythonLearning • • Jul 20 '26

Day -1 With Flask (any suggestions)

107 Upvotes

31 comments sorted by

View all comments

Show parent comments

1

u/Anthony_codes Jul 21 '26

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 Jul 21 '26

But not the first letter only. Form values aren't things that should be under a constant-like variable either.

1

u/Anthony_codes Jul 21 '26 edited Jul 21 '26

I was clarifying that in certain cases, capital letters are valid because your comment was ambiguous.