Tagged Questions
2
votes
1answer
88 views
Should I return iterators or more sophisticated objects?
Say I have a function that creates a list of objects. If I want to return an iterator, I'll have to return iter(a_list). Should I do this, or just return the list as it is? My motivation for returning ...
4
votes
5answers
161 views
Which style to use for unused return parameters in a Python function call
Is there any recommended/generally accepted coding style for handling situations where a function returns a tuple of values but only one of those values is used afterwards (note that this is mostly ...
22
votes
7answers
765 views
How can I learn to effectively write Pythonic code?
I'm tired of getting downvoted and/or semi-rude comments on my Python answers, saying things like "this isn't Pythonic" or "that's not the Python way of doing things". To clarify, I'm not tired of ...