Coment t o show whihc python version is statement for

This commit is contained in:
Alireza Savand 2016-09-22 14:29:36 +04:00
parent 610e8ca75c
commit 14c22bcab3

View File

@ -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]