[Python-ideas] Two small functional-style-related improvements