Stefan Krah added the comment: I'm trying to think of an optimization for the native types. It should be possible to cast any native type element to unsigned char and use the truncated value for the bytes hash.
Well, for double probably it's required to go from double -> int64_t -> unsigned char, otherwise the first cast is technically undefined for negative values, though it works with gcc. For non-native types and compound types, Nick's suggestion of hashing the shape and a couple of values seems to be the best solution. Should we do anything about this before 3.3.0? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15573> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com