Author: Lukas Diekmann <[email protected]>
Branch: set-strategies
Changeset: r49264:a7633ebf174b
Date: 2011-11-04 14:49 +0100
http://bitbucket.org/pypy/pypy/changeset/a7633ebf174b/

Log:    use string strategy when appending string to empty set

diff --git a/pypy/objspace/std/setobject.py b/pypy/objspace/std/setobject.py
--- a/pypy/objspace/std/setobject.py
+++ b/pypy/objspace/std/setobject.py
@@ -311,6 +311,8 @@
     def add(self, w_set, w_key):
         if type(w_key) is W_IntObject:
             strategy = self.space.fromcache(IntegerSetStrategy)
+        elif type(w_key) is W_StringObject:
+            strategy = self.space.fromcache(StringSetStrategy)
         else:
             strategy = self.space.fromcache(ObjectSetStrategy)
         w_set.strategy = strategy
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to