Re: [Python-3000] Consistency of memoryview and bytes object

2008-04-26 Thread Greg Ewing
Travis Oliphant wrote: My feel right now is to not do the special case at all and actually return a memory-view object even for element access That could be very tedious in the case where the elements are actually bytes, though. Maybe there should be a separate bytesview() object to use instea

Re: [Python-3000] Consistency of memoryview and bytes object

2008-04-26 Thread Travis Oliphant
Guido van Rossum wrote: Hm, yes this seems reasonable. Travis, what do you think of this? On Sat, Apr 26, 2008 at 1:51 PM, Alexandre Vassalotti <[EMAIL PROTECTED]> wrote: Would it be a good idea to make memoryview indexing consistent with the behaviour of bytes object? >>> memoryview(b'hel

Re: [Python-3000] Consistency of memoryview and bytes object

2008-04-26 Thread Guido van Rossum
Hm, yes this seems reasonable. Travis, what do you think of this? On Sat, Apr 26, 2008 at 1:51 PM, Alexandre Vassalotti <[EMAIL PROTECTED]> wrote: > Would it be a good idea to make memoryview indexing consistent with > the behaviour of bytes object? > > >>> memoryview(b'hello')[0] > bytearra

[Python-3000] Consistency of memoryview and bytes object

2008-04-26 Thread Alexandre Vassalotti
Hi, Would it be a good idea to make memoryview indexing consistent with the behaviour of bytes object? >>> memoryview(b'hello')[0] bytearray(b'h') >>> b'hello'[0] 104 -- Alexandre ___ Python-3000 mailing list Python-3000@python.org http://mail.