A fix regarding the compatibility with python 2.6 (#1981)
* A fix regarding the compatibility with python 2.6
the syntax of {n: self.attr(n) for n in attr_names} is illegal in python 2.6
* Update core.py
add a space after comma
This commit is contained in:
parent
5d74578095
commit
179b384e39
@ -762,7 +762,7 @@ class Booster(object):
|
||||
ctypes.byref(length),
|
||||
ctypes.byref(sarr)))
|
||||
attr_names = from_cstr_to_pystr(sarr, length)
|
||||
res = {n: self.attr(n) for n in attr_names}
|
||||
res = dict([(n, self.attr(n)) for n in attr_names])
|
||||
return res
|
||||
|
||||
def set_attr(self, **kwargs):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user