mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-03 20:55:01 +08:00
BUG: dict.itervalues() doesn't exist in PY3
This commit is contained in:
@@ -26,6 +26,7 @@ from six.moves import filter
|
||||
from six import (
|
||||
exec_,
|
||||
iteritems,
|
||||
itervalues,
|
||||
string_types,
|
||||
)
|
||||
from operator import attrgetter
|
||||
@@ -1297,5 +1298,7 @@ class TradingAlgorithm(object):
|
||||
"""
|
||||
Return a list of all the TradingAlgorithm API methods.
|
||||
"""
|
||||
return [fn for fn in cls.__dict__.itervalues()
|
||||
if getattr(fn, 'is_api_method', False)]
|
||||
return [
|
||||
fn for fn in itervalues(vars(cls))
|
||||
if getattr(fn, 'is_api_method', False)
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user