|
tobesent = [p for p in pkt] |
Is this list comprehension necessary at this position? Without a list comprehension, the time_sent values in the objects to be sent will be propagated to the original object. Because of the deep copy in the list comprehension, the time_sent is only set in a temporary object and not in the original object. This applies for all sr and sr1 function calls.