1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Replaced im_func and im_self by __func__ and __self__.

The new names are Python 3 compatible.
This commit is contained in:
Claude Paroz
2012-05-12 22:32:43 +02:00
parent 33ffd28d76
commit bbb12581db
3 changed files with 17 additions and 17 deletions

View File

@@ -6,8 +6,8 @@ from django.dispatch import saferef
WEAKREF_TYPES = (weakref.ReferenceType, saferef.BoundMethodWeakref)
def _make_id(target):
if hasattr(target, 'im_func'):
return (id(target.im_self), id(target.im_func))
if hasattr(target, '__func__'):
return (id(target.__self__), id(target.__func__))
return id(target)
class Signal(object):