Hacker News new | ask | show | jobs
by gakada 3568 days ago
I don't get what you're saying. How is it possible to write code without string literals?

    subprocess.check_call([
      "/usr/bin/env",
      "echo"
      "hello world"
    ])
2 comments

I think she meant to not pass the strings but assign them to constants and then pass those.
Yep! But, like I mentioned, linter can catch this too.
he probably meant not using string literals / ints outside of top-level declarations, so you would instead assign all these parameters to "constants" at top level and then use those constants in function calls, hence avoiding this error.