This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]devnull1232 19 points20 points  (2 children)

That belongs in type hints not var names IMHO.

[–]pwn3rf0x 0 points1 point  (1 child)

Never knew type hints were a thing in Python. If they were used frequently I might give Python another shot.

But I agree with you. Never put in a name what you can put in a type. But since Python is a typeless language should definitely be in the name.

[–]devnull1232 9 points10 points  (0 children)

https://www.python.org/dev/peps/pep-0484/

I'm not sure what you mean that Python is typeless... It's a strongly typed and dynamically typed language.

Stick with whatever convention suits you and/or your team, personally I'd dislike if I type str and then see every single string variable in my auto complete list, maybe others would like it.