STINNER Victor added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19915>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to