On Thu, 15 Jul 2010 00:43:49 +0200
"M.-A. Lemburg" wrote:
> Is this intended or should I open a bug report for it:
>
> >>> m = memoryview('abc')
> >>> m == 'abc'
> True
> >>> str(m) == 'abc'
> False
> >>> str(m)
> ''
Well, I think this is intended. str(m) is the human-readable string
representat
Nick Coghlan wrote:
> I wouldn't assume so - memoryview is meant to eventually support more
> than just 1-D views of contiguous memory (see PEP 3118), so that
> conversion doesn't seem intuitive to me.
In the example I'm passing in a single dimension contiguous memory
chunk to memoryview(), so in
On Jul 14, 2010, at 3:43 PM, M.-A. Lemburg wrote:
> Is this intended or should I open a bug report for it:
>
m = memoryview('abc')
m == 'abc'
> True
str(m) == 'abc'
> False
str(m)
> ''
>
> I would have expected str(m) == 'abc'.
That is also my expectation.
A memoryview obj
I wouldn't assume so - memoryview is meant to eventually support more
than just 1-D views of contiguous memory (see PEP 3118), so that
conversion doesn't seem intuitive to me.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___