Message228172
I don't like the idea of the array-view int.bits[a:b]: it's harder to implement and the proposed behaviour is different than a list. Example:
>>> x=list("abcdef")
>>> x[2]
'c'
>>> x[2:4]
['c', 'd']
x[2:4] returns a subset of the list, so a new list. It doesn't return "cd". I would expect int.bits[a:b] to return a list of integers in range 0..1.
I prefer int.bits(bit, nbits=1), because it's more obvious that it returns an integer (and not a list) for nbits > 1. |
|
Date |
User |
Action |
Args |
2014-10-02 07:33:26 | vstinner | set | recipients:
+ vstinner, tim.peters, rhettinger, mark.dickinson, pitrou, meador.inge, martin.panter, serhiy.storchaka, hct, anon, josh.r |
2014-10-02 07:33:26 | vstinner | set | messageid: <1412235206.18.0.979221964423.issue19915@psf.upfronthosting.co.za> |
2014-10-02 07:33:26 | vstinner | link | issue19915 messages |
2014-10-02 07:33:25 | vstinner | create | |
|