Ramchandra Apte added the comment:
@Raymond Hettinger
Why? Please respond to my comments.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17001
___
Ramchandra Apte added the comment:
Performance info using the attached program:
~2.5 sec, original
~3.5 sec, patched
(patched version is 40% slower)
Is anybody doing the comparison in performance-critical cases?
--
___
Python tracker
Ramchandra Apte added the comment:
On 21 January 2013 02:42, Raymond Hettinger rep...@bugs.python.org wrote:
NotImplemented
Can you please elaborate on it doesn't handle the NotImplemented logic
very well.
AFAIK both will give NotImplemented for the same values.
--
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
resolution: - invalid
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17001
___
Changes by Ramchandra Apte maniandra...@gmail.com:
Removed file: http://bugs.python.org/file28794/issue-v2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17001
___
Ramchandra Apte added the comment:
Oh darn, I included another bugs changes in it.
I unlinked the v2 patch and have attached issue17001-v2.patch
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17001
Serhiy Storchaka added the comment:
Except for mistakenly included functional.rst changes, the patch looks good for
me.
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17001
Raymond Hettinger added the comment:
I recommend against this patch. The code generated by functools.total_ordering
is less efficient than the existing code and it doesn't handle the
NotImplemented logic very well.
total_ordering() is a shortcut, not a best practice.
--
nosy:
New submission from Ramchandra Apte:
This would reduce the complexity of uuid.UUID and also if the way it compares
changes, one would't have to change all the compare methods.
Attached is a patch.
--
components: Library (Lib)
files: issue.patch
keywords: patch
messages: 180275
nosy:
Changes by Ramchandra Apte maniandra...@gmail.com:
--
type: - enhancement
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17001
___
___
Brian Curtin added the comment:
Can you provide test cases for this code?
--
nosy: +brian.curtin
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17001
___
Ramchandra Apte added the comment:
Yes, will do so.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17001
___
___
Python-bugs-list mailing list
Ramchandra Apte added the comment:
@Brian Curtin
It appears that there are tests for UUID ordering. [0]
I will run the tests.
[0] http://hg.python.org/cpython/file/d1e6a48dfb0d/Lib/test/test_uuid.py#l188
--
___
Python tracker rep...@bugs.python.org
Ramchandra Apte added the comment:
Damn, I forgot to add import functools.
Here is a fixed version that passes test_uuid.
--
Added file: http://bugs.python.org/file28794/issue-v2.patch
___
Python tracker rep...@bugs.python.org
14 matches
Mail list logo