mirror of
https://github.com/django/django.git
synced 2025-11-22 20:16:24 +00:00
Replaced im_func and im_self by __func__ and __self__.
The new names are Python 3 compatible.
This commit is contained in:
parent
33ffd28d76
commit
bbb12581db
3 changed files with 17 additions and 17 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue