From 9ded75d05dc648d2e0ed082db5af857a371f13ca Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Tue, 29 Mar 2022 12:57:31 -0400 Subject: [PATCH] Agent: Update TODO in bit_manipulators.py --- monkey/infection_monkey/utils/bit_manipulators.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/monkey/infection_monkey/utils/bit_manipulators.py b/monkey/infection_monkey/utils/bit_manipulators.py index 25280b813..8de1460ed 100644 --- a/monkey/infection_monkey/utils/bit_manipulators.py +++ b/monkey/infection_monkey/utils/bit_manipulators.py @@ -14,6 +14,10 @@ def flip_bits(data: bytes) -> bytes: # Remove the flip_bits_in_single_byte() function and rework the # unit tests so that we still have a high-degree of confidence # that this code is correct. + # + # EDIT: I believe PyPy will attempt to inline functions + # automatically. I don't know that CPython makes any such + # optimizations. flipped_bits[i] = flip_bits_in_single_byte(byte) return bytes(flipped_bits)