Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
gakada
· 10y ago · 0 comments
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" ])
Comments
[–]
nitely
10y ago
I think she meant to not pass the strings but assign them to constants and then pass those.
[–]
bpicolo
10y ago
Yep! But, like I mentioned, linter can catch this too.
[–]
ves
10y ago
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.