Skip to content

Commit 2e1e8ff

Browse files
committed
Simplify keyword arguments in wrapped functors.
No need to use DoubleAttributes if direct access works as well.
1 parent 0c004bb commit 2e1e8ff

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

diffpy/srreal/wraputils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ def __call__(self, x):
102102
'''Evaluate this functor at x.
103103
'''
104104
if dbattrs:
105-
kw = dict([(n, self._getDoubleAttr(n))
106-
for n in self._namesOfWritableDoubleAttributes()])
105+
kw = {n : getattr(self, n) for n in dbattrs}
107106
rv = fnc(x, **kw)
108107
else:
109108
rv = fnc(x)

0 commit comments

Comments
 (0)