New submission from Eugene Toder <elto...@gmail.com>:

A comment in the definition of PyCodeObject in Include/code.h says:

/* The rest doesn't count for hash or comparisons */

which, I think, makes a lot of sense. The implementation doesn't follow this 
comment, though. code_hash actually includes co_name and code_richcompare 
includes co_name and co_firstlineno. This makes hash and comparison 
inconsistent with each other and with the comment.

----------
components: Interpreter Core
messages: 135015
nosy: eltoder
priority: normal
severity: normal
status: open
title: Inconsistent hash and comparison for code objects
type: behavior
versions: Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11983>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to