jump to:all–mastodon–bluesky–lemmy–lobsters–dev–stack–wiki–rss–hn
wwebbit
view: | | |

Knowledge / everything · hot matching “python”

2 shown · updated 3m ago · read only
  1. Should I capitalize constant in Python? (stackoverflow.com)stack

    9 points by boh in stackoverflow.com · 8y ago · stack comments

    In PEP8, the general rule is to declare constants in UPPER_CASE chars. In real life, there can be a number of situations: #!env python DATABASE_HOST = 'localhost' app = Flask('myapp') base_two = partial(int, base=2) Typically we consider string-type or numeric-type variables as…
    filed under python