Discussion:
[Erp5-dev] calling mechanism
Yoshinori Okuji
2005-02-04 09:08:35 UTC
Permalink
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
Loading...