-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- defaultdict to avoid initialising every entry up front - Use struct.calcsize instead of copying the values. - if x == 0: y = False: else y = True => y = bool(x) - list[len(list)-1] => list[-1] - math.pow(256, 1) => 0x08 etc. - x = bytearray(); x.append(y); x.append(z) => x = bytearray([y, z]) - value = x; return value => return x
- Loading branch information
Showing
5 changed files
with
35 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is the root cause of issue #128 , reverting the code to
fixes the error.
The reverted code returns a packet of 89 bytes, but the new code returns zero bytes.