[Erp5-dev] calling mechanism
Yoshinori Okuji
yo at nexedi.com
Fri Feb 4 10:08:35 CET 2005
I fixed one bug in DeliveryCell.py. It was like this:
return self._baseGetTargetStartDate(self)
This is a typical confusion about the calling convention in Python. I
think this is ugly, but self is automatically pased when the caller is
an instance, and self is not passed when the caller is a class. For
example:
Movement.getTargetStartDate(self)
becomes:
getTargetStartDate(self)
And:
self._baseGetTargetStartDate(self)
becomes:
_baseGetTargetStartDate(self, self)
Be careful.
YO
--
Yoshinori Okuji, Nexedi Research Director
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Free / Open Source ERP Software for small and medium companies
http://www.erp5.org
Storever: OpenBrick, WiFi infrastructure, notebooks and servers
http://www.storever.com
More information about the Erp5-dev
mailing list