classLogisticsService(object):'''classdocs'''def__init__(self,args):'''Constructor'''self._args=argsdefaddReceiving(self):login=self._args.pop('login')recv=Receiving()db=...
class LogisticsService(object):
'''
classdocs
'''
def __init__(self, args):
'''
Constructor
'''
self._args = args
def addReceiving(self):
login = self._args.pop('login')
recv = Receiving()
db = DB()
ts = TodoService("")
# param = self._args['receiving'].replace('\\"', '"')
param = self._args['receiving'].replace("\\'", "'")
jrecv = json.loads(param)
items = None
对于python中的初始化init这个怎么理解啊?param = self._args['receiving'].replace("\\'", "'")这一句是啥意思啊,还有addReceiving(self)中self到底是什么啊?我的理解是args是LogisticsService类的一个属性,addReceiving(self)方法中的参数self就是LogisticsService类中的args。求大神指导!!
展开