2 ms·
This article contains excellent recommendations except for one (the numbers.py module is nearly useless).
by raymondh 14y ago
This article contains excellent recommendations except for one (the numbers.py module is nearly useless).
- vog 14y agoCould you elaborate on that?
- mattdeboard 14y agoRaymond, what's your take on the ``redirect_stdout`` class not inheriting? I thought with new-style classes inheriting from ``object`` was the standard.
- wladimir 14y agoPython 3 removes old-style classes and thus removes the need to explicitly inherit from object. (Also it appears it's just an example to illustrate the use of context managers, not of the perfect Python program. You'd never want to use the code in practice, if only because it relies on changing global state and thus will mess up when multiple threads use it at once)