Hacker News new | ask | show | jobs
by ciupicri 242 days ago
What is this $hi+? You're creating a list that looks like this: [0, 2, …, 2]. It's also common / Pythonic to use uppercase L for lists.

If you don't want to use global variables just add the result of f to x and stop using the global variable, i.e.

   x += f()
2 comments

> It's also common / Pythonic to use uppercase L for lists.

Variables always start with a lowercase letter in idiomatic Python unless they're constants or types.

Using single-letter uppercase for variables is not unusual in ML Python code, but that also happens to be one of the worst ecosystems when it comes to idiomatic Python and general code quality.

Not even wrong.