[issue1733184] slice type is unhashable
Alexander Belopolsky
report at bugs.python.org
Sat Mar 8 15:12:11 CET 2008
Alexander Belopolsky added the comment:
Note that L[:] and L[:] = [] are well-known idioms for making a copy of
a list and emptying the list respectively. (For dictionaries we have
D.copy() and D.clear().) Someone looking at x[:] or x[:] = [] should
immediately recognize a list copy or clear operation. Having to think
of whether x may be a dictionary would make such code very confusing.
_____________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1733184>
_____________________________________
More information about the Python-bugs-list
mailing list