Georg Brandl added the comment:

While everybody is throwing ideas around: what about the opposite?

If extracting bit ranges from bitfields is common enough to warrant this 
addition, updating bitfields with a bit range is probably just as common.

This'd need something like

i.with_bits(value, pos, width=1)

No preference if it should raise an exception if value is wider than "width".

----------
nosy: +georg.brandl

_______________________________________
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