这里是我的函数的顶部(它是包装Bill.com API的现有python实现的类的一部分):
def _get_objects(self,
bdco,
refresh=False,
sort=[],
filters=[],
start=0, max=999,
include_inactive=False):
"""
Retrieve (either from cache or the service directly) all of the object
in question (e.g. Vendor, Customer, etc.)
"""
if ('isActive','=','1') in filters \
and bdco in ["MoneyMovement", "ReceivedPay"]:
print bdco, filters
import ipdb;ipdb.set_trace()
raise Exception("Huh!?")
调用此功能的功能绝对不会传递任何过滤器'参数或** kwargs可能包含一个。仍然:
ReceivedPay [('isActive', '=', '1')]
> /my_dir/simple_bdc.py(367)_get_objects()
366 import ipdb;ipdb.set_trace()
--> 367 raise Exception("huh!?")
368
ipdb>
我的堆栈中的许多其他类都调用了这个函数,所以我想知道不同的调用者是否在某种程度上设置了一些持久的东西,但是我完全被难倒了。有关如何排除故障的任何想法吗?
谢谢!