From: Todd <tod...@gm...> - 2014-03-07 11:08:29
|
On Mar 6, 2014 10:24 PM, "Skip Montanaro" <sk...@po...> wrote: > > On Thu, Mar 6, 2014 at 3:13 PM, Nelle Varoquaux > <nel...@gm...> wrote: > > If I need to understand what exactly os.stat returns, I just read the > > documentation, and not rely on some possibly misleading variable > > names. > > Despite our wish that it wasn't so, it is likely that there is far > more undocumented than documented code out in the wild, or behind > firewalls where we can't see it. I just used os.stat as an example of > a well-known function that returns multiple values. (Precisely, so > people wouldn't have to run to the documentation or that I would have > to provide a more-fleshed-out example.) In my experience, there's no > real need to be intentionally obscure by not giving a variable a > meaningful, whether or not you intend/expect to use it. Besides, open > source code can serve as a living example of good coding practices. > Might as well do our best in that regard. > > Just sayin'... > > Skip Whether it is necessarily the optimal choice, I think there is something to be said for following established conventions. Besides the fact that IDEs complain if you don't, it makes it easier for outside contributors to understand what it's going on. |