Skip to content

Commit

Permalink
Remove superflous comment about interning of unicode dict keys on Pyt…
Browse files Browse the repository at this point in the history
…hon2. The existing behaviour matches the C implementation.
  • Loading branch information
jamadden committed May 19, 2015
1 parent 89a9197 commit 7a70924
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions persistent/persistence.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,6 @@ def __setstate__(self, state):
for k, v in inst_dict.items():
# Normally the keys for instance attributes are interned.
# Do that here, but only if it is possible to do so.

# TODO: On Python 2 codebases that straddle Python3,
# and use 'from __future__ import unicode_literals' it's not
# unheard of to have unicode objects in the __dict__ by accident.
# Should we watch for that and attempt to encode it so it can be
# interned?
idict[intern(k) if type(k) is str else k] = v
slotnames = self._slotnames()
if slotnames:
Expand Down

0 comments on commit 7a70924

Please sign in to comment.