[issue20399] Comparison of memoryview

2014-01-26 Thread fin swimmer

New submission from fin swimmer:

Comparison by using memoryview seems not to work completely.

This works:
>>> memoryview(bytearray(range(5))) != memoryview(bytearray(range(5)))
False
>>> memoryview(bytearray(range(5))) == memoryview(bytearray(range(5)))
True

But:
>>> memoryview(bytearray(range(5))) < memoryview(bytearray(range(5)))
Traceback (most recent call last):
  File "", line 1, in 
TypeError: unorderable types: memoryview() < memoryview()

So memoryview cannot be used as a key-value for sorting

--
components: Library (Lib)
messages: 209351
nosy: fin.swimmer
priority: normal
severity: normal
status: open
title: Comparison of memoryview
type: behavior
versions: Python 3.5

___
Python tracker 
<http://bugs.python.org/issue20399>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20339] Make bytes() use tp_as_buffer for cmp

2014-01-26 Thread fin swimmer

fin swimmer added the comment:

This is exactly what I need!

Would be a great work.

--
nosy: +fin.swimmer

___
Python tracker 
<http://bugs.python.org/issue20339>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com