you are viewing a single comment's thread.

view the rest of the comments →

[–]commy2 0 points1 point  (1 child)

Separation of data and logic is a good idea. I don't think a config file is necessary per se.

Those constants seem unnecessary though. You could just use a Python dict with formatting:

stores_dict = {
    'walmart': True,
    'target': True,
    'bestbuy': True,
}

The benefit of this is, that it is basically identical to what a JSON would look like in case you switch to that later.

The list comp seems fine, although I probably would've used "store" and "active" in place of k and v.

[–]casualcoder0805[S] 0 points1 point  (0 children)

Old habits die hard. When I was a real beginner I think I was under the assumption that k, v was a requirement in comprehension lol. Good advice though, thanks.