On Sat, Feb 14, 2009 at 9:56 PM, Lie Ryan <lie.1...@gmail.com> wrote: > On Sat, 14 Feb 2009 22:10:41 -0800, John Nagle wrote: > >> >>> xx = b'x' > > Isn't this creating a regular byte? > > Shouldn't creation of bytearray be: > >>>> xx = bytearray(b'x')
Indeed, and slicing that does give back a single byte (which Python represents as an integer): >>> b = bytearray(b'abc') >>> b[0] 97 Cheers, Chris -- Follow the path of the Iguana... http://rebertia.com -- http://mail.python.org/mailman/listinfo/python-list