[issue20783] bytearray init fails when \x00 is present

2014-02-26 Thread Andrew P. Lentvorski, Jr.
Changes by Andrew P. Lentvorski, Jr. : -- resolution: -> invalid ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue20783] bytearray init fails when \x00 is present

2014-02-26 Thread Andrew P. Lentvorski, Jr.
Andrew P. Lentvorski, Jr. added the comment: Ayup, I are an idiot. Sorry. ggRAM = bytearray('\x00'*RAM_SIZE_BYTES) Works fine. -- status: open -> closed ___ Python tracker ___

[issue20783] bytearray init fails when \x00 is present

2014-02-26 Thread R. David Murray
Changes by R. David Murray : -- stage: committed/rejected -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue20783] bytearray init fails when \x00 is present

2014-02-26 Thread R. David Murray
R. David Murray added the comment: That isn't a valid bytearray initialization call. The two argument form is (string, encoding), not (size, string). The error message you get is a bit funky and not particularly informative, though. Maybe someone will want to try to improve that. -

[issue20783] bytearray init fails when \x00 is present

2014-02-26 Thread Andrew P. Lentvorski, Jr.
New submission from Andrew P. Lentvorski, Jr.: The byte array init fails when \x00 is present This fails: ggRAM = bytearray(RAM_SIZE_BYTES, '\x00'*RAM_SIZE_BYTES) However, this works: ggRAM = bytearray(RAM_SIZE_BYTES) ggRAM[:] = '\x00'*RAM_SIZE_BYTES -- components: Interpreter Core mes