Closed GoogleCodeExporter closed 9 years ago
thanks! I will have a look this weekend.
Original comment by mark.duf...@gmail.com
on 22 Jan 2010 at 7:44
are you sure you didn't mean to use this:
hash(tuple(imap(tuple, board)))
because hashing an iterator seems a bit strange to me.. I will have to lookup
what
happens then in CPython.. :-) using the above it works with shed skin (SVN at
least).
Original comment by mark.duf...@gmail.com
on 22 Jan 2010 at 7:54
Original comment by mark.duf...@gmail.com
on 22 Jan 2010 at 7:55
Yes, it sounds a bit strange :) It's a little bug. I don't know if hash
evaluates all
the expression or if it starts hashing iterating it (but this kind of writing
will be
meaningless if it uses the first behaviour... but generators are expressed like
tuples -> (...) :) ).
Original comment by frap...@gmail.com
on 22 Jan 2010 at 8:17
Also, another problem (for me) if I use return hash(tuple(imap(tuple, board))).
Original comment by frap...@gmail.com
on 22 Jan 2010 at 10:28
Attachments:
ah, sorry, I seem to have broken extension module support yesterday. it should
be
fixed now ^^
Original comment by mark.duf...@gmail.com
on 23 Jan 2010 at 8:17
hm, hashing it just takes the memory address:
>>> a = imap(tuple, [[1,2,3]])
>>> id(a) == hash(a)
True
I will have to fix shedskin in any case to do that here.
Original comment by mark.duf...@gmail.com
on 23 Jan 2010 at 8:29
on revisiting issues, I don't think supporting hashing of functions would be
useful
in shedskin.. it also occurs here only because of buggy code. so I'm closing
this issue.
Original comment by mark.duf...@gmail.com
on 21 Mar 2010 at 9:51
Original issue reported on code.google.com by
frap...@gmail.com
on 22 Jan 2010 at 6:55Attachments: