Hacker News new | ask | show | jobs
by laserlight 1067 days ago
Good catch. I would prefer shadowing an unused built-in over using “inp”. Alternatively, “input_” should do fine.
4 comments

Don't shadow. Just don't. We've got enough variable names in the universe. :)
Strong agree. To clarify, I wouldn't shadow. I wouldn't use “inp” either.
One fairly common convention is to suffix with `_` to avoid shadowing, e.g. `input_`
shadowing is what instantly would have me reject a peer review. there is literally no excuse.

inp is just standard in python, along with uin (user input), or sometimes also raw or iraw.

You cannot win this battle. There is nothing wrong with 'inp'

Please don't shadow ever :(
Man..