Message205715
Here are some inadequate tests to add to Lib/test/test_long.py
def test_bits_at(self):
def bits_at(n, pos, width=1):
return (n>>pos) & ((1 << width) - 1)
for n in [123, 7777777, (1<<35)|(1<<30)|(1<<25)]:
for i in range(50):
for j in range(20):
self.assertEqual(n.bits_at(i, j), bits_at(n, i, j)) |
|
Date |
User |
Action |
Args |
2013-12-09 17:09:39 | anon | set | recipients:
+ anon, tim.peters, rhettinger, mark.dickinson, pitrou, vstinner, meador.inge, serhiy.storchaka, hct |
2013-12-09 17:09:39 | anon | set | messageid: <1386608979.83.0.779765603572.issue19915@psf.upfronthosting.co.za> |
2013-12-09 17:09:39 | anon | link | issue19915 messages |
2013-12-09 17:09:39 | anon | create | |
|