From 14c22bcab383eec424e32c05ea6df37ba88993b9 Mon Sep 17 00:00:00 2001 From: Alireza Savand Date: Thu, 22 Sep 2016 14:29:36 +0400 Subject: [PATCH] Coment t o show whihc python version is statement for --- rest_framework/compat.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rest_framework/compat.py b/rest_framework/compat.py index c278448fd..8fc7f8a53 100644 --- a/rest_framework/compat.py +++ b/rest_framework/compat.py @@ -140,10 +140,10 @@ def value_from_object(field, obj): return field.value_from_object(obj) -def getargspec(obj): # type: tuple - if not hasattr(inspect, 'signature'): +def getargspec(obj): + if not hasattr(inspect, 'signature'): # Python 2.7 - 3.2 parameters, _, _, defaults = inspect.getargspec(obj) - else: + else: # Python +3.3 signature = inspect.signature(obj) parameters = signature.parameters defaults = [i for i in parameters if i.default != inspect._empty]