4 ms·
Is it only you writing the code? If it's just me, generally the names of my variables imply the type ("price" is probably a float, for example). But say you'r
by prewett 17y ago
Is it only you writing the code? If it's just me, generally the names of my variables imply the type ("price" is probably a float, for example). But say you're joining a project with 100 Python classes. How do you write the code so that someone else will know that the arg named "network" is a ip address string and not a network socket or a class, presumably named "Network"?
- steveklabnik 17y agoFunny, my "price" would probably be an integer ;). Maybe it comes down to documentation. If I were to use some sort of function where I wasn't sure what the argument was, I'd look in the docs to see first.