News for hackers. Stuff that matters.
Re:Anti-Patterns in Python Programming by pbh101 on Thursday July 10, 2014 @12:07PM (#8015429)
Disagree. Would say it's a decent violation of expectations for the same instance to be passed into every invocation. Of course, the counterargument is 'know your tools,' which I'm partial to, but the fact that this pops up is an indication it is counterintuitive.
Re:Anti-Patterns in Python Programming by mark-r on Thursday July 10, 2014 @01:34PM (#8015958)
I actually agree it's counterintuitive. But this particular example makes no sense, nobody should be writing real-world code that looks like this in the first place. Either modify the original or return a copy, don't try to do both.