On Fri, Jul 13, 2012 at 10:38:26AM +0200, Vratislav Podzimek wrote:
On Thu, 2012-07-12 at 10:11 -0400, Martin Gracik wrote:
new.unknownFSlines = copy.copy(self.unknownFSlines)Aren't the members of self.unknownFSlines list just strings? Is the copy.copy necessary? Wouldn't plain self.unknownFSlines[:] be enough?
copy.copy() seemed better readable to me. In the discussion on IRC Martin suggested the one more way to do the copy:
new.unknownFSlines = list(self.unknownFSlines)
that would work also for tuples and generators. Any preferences? I will change this to one of the methods not needing the import before pushing. Does this patch otherwise look good?
Why do we need to handle tuples and generators? I prefer [:] unless there is a compelling reason to use something else.
The rest of it looks good to me. I just think copy.copy is overkill for a list of strings.