This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author anon
Recipients anon, georg.brandl, hct, josh.r, mark.dickinson, martin.panter, meador.inge, pitrou, rhettinger, serhiy.storchaka, tim.peters, vstinner
Date 2014-10-02.11:01:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
@Georg: I don't think it would be as common but do agree it'd be useful.

I think it can be implemented "efficiently" in pure Python currently.

def with_bits(i, value, pos, width=1):
  width = min(width, value.bit_length())
  mask = ((1 << width) - 1)
  v = value & mask
  i = i & ~(mask << pos)
  return i | (v << pos)
Date User Action Args
2014-10-02 11:01:05anonsetrecipients: + anon, tim.peters, georg.brandl, rhettinger, mark.dickinson, pitrou, vstinner, meador.inge, martin.panter, serhiy.storchaka, hct, josh.r
2014-10-02 11:01:05anonsetmessageid: <>
2014-10-02 11:01:05anonlinkissue19915 messages
2014-10-02 11:01:05anoncreate