Hacker News new | past | comments | ask | show | jobs | submit login

This article contains excellent recommendations except for one (the numbers.py module is nearly useless).



Could you elaborate on that?


Raymond, what's your take on the ``redirect_stdout`` class not inheriting? I thought with new-style classes inheriting from ``object`` was the standard.


Python 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)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: