summaryrefslogtreecommitdiff
path: root/sphinx
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-01-10 13:04:23 -0600
committerBenjamin Peterson <benjamin@python.org>2009-01-10 13:04:23 -0600
commitd103698d5f6f687094983f678df80c41aac4fac3 (patch)
tree193418079f8c375dd536fa41ae9ab0a265361f26 /sphinx
parent5f81b007a8cb7a8c0f338b94c626683b24d04ec7 (diff)
downloadsphinx-d103698d5f6f687094983f678df80c41aac4fac3.tar.gz
use the py3k version of callable()
Diffstat (limited to 'sphinx')
-rw-r--r--sphinx/config.py2
-rw-r--r--sphinx/ext/autodoc.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/config.py b/sphinx/config.py
index 428c0bf4..e1eb8ec8 100644
--- a/sphinx/config.py
+++ b/sphinx/config.py
@@ -137,7 +137,7 @@ class Config(object):
if name not in self.values:
raise AttributeError('No such config value: %s' % name)
default = self.values[name][0]
- if callable(default):
+ if hasattr(default, '__call__'):
return default(self)
return default
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py
index be3e3f0f..417eb555 100644
--- a/sphinx/ext/autodoc.py
+++ b/sphinx/ext/autodoc.py
@@ -166,7 +166,7 @@ def between(marker, what=None, keepempty=False):
def isdescriptor(x):
"""Check if the object is some kind of descriptor."""
for item in '__get__', '__set__', '__delete__':
- if callable(getattr(x, item, None)):
+ if hasattr(getattr(x, item, None), '__call__'):
return True
return False