2018-06-22 | Paul Boddie | file changeset files shortlog | Obtain the distinct set of accessor kinds. Fixing this breaks invocations of identified static methods where the instance accessor should be tested but is not, such as in the keyword_args test. |
paul@798 | 1 | def encode(value): |
paul@798 | 2 | return ((value & 8) << 4) | ((value & 4) << 3) | ((value & 2) << 2) | ((value & 1) << 1) |
paul@798 | 3 | |
paul@798 | 4 | print encode(15) # 170 |
paul@798 | 5 | print encode(8) # 128 |
paul@798 | 6 | print encode(2) # 8 |
paul@798 | 7 | print encode(0) # 0 |