edoburu/django-parler — pull request #45 by twidi (2014-11-05 16:06:37+00:00)
Title: Correct test using __func__ in python 3

On py3, the class level function doesn't have a `__func__`
property, it can be checked directly.

So the logic in pseudo code is:

```python
if is_py3:
default_method == SomeClass.method
else:
default_method == SomeClass.method.__func__

if not (super_method.__func__ is default_method):
...
```

I prefered to use `getattr` to avoid checking python version:

```python
getattr(SomeClass.method, '__func__', SomeClass.method)
```

=> if the class level function has a `__func__` attribute, use it,
else use it directly