summaryrefslogtreecommitdiff
path: root/blinker
diff options
context:
space:
mode:
authorjason kirtland <jek@discorporate.us>2012-10-30 12:19:18 -0700
committerjason kirtland <jek@discorporate.us>2012-10-30 12:19:18 -0700
commit3f5023f85766852cc7a35ee5ace1cf430f7c8cda (patch)
tree31b4a9cf37a6beb50989079a1f970c9fd9ce33c3 /blinker
parent5037e58adeeaf8f554b290a2e2bc95f57c9a7113 (diff)
parentb0487751c30b14d490a13719c189921549869ddf (diff)
downloadblinker-3f5023f85766852cc7a35ee5ace1cf430f7c8cda.tar.gz
Merged in tomasd/blinker-1 (pull request #1) - better support for str() and unicode() instances as senders (keying id() is wishywashy for these, in cpython at least)
Diffstat (limited to 'blinker')
-rw-r--r--blinker/_utilities.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/blinker/_utilities.py b/blinker/_utilities.py
index 940275d..076f2e8 100644
--- a/blinker/_utilities.py
+++ b/blinker/_utilities.py
@@ -107,6 +107,8 @@ class symbol(object):
def hashable_identity(obj):
if hasattr(obj, 'im_func'):
return (id(obj.im_func), id(obj.im_self))
+ elif isinstance(obj, basestring):
+ return obj
else:
return id(obj)