for ... in or aq_acquire arguments ?
in this line for data in self.aq_acquire('_getProductRegistryData')('zclasses'): i suppose that aq_acquire returns the value of _getProductRegistryData of self but what is "'zclasses'" is it anargumet for the for loop or for the aq_acquire method ? I serached for the syntax of aq_acquire and for..in and i did'nt find this syntax for expression in (expression_list) (something_else): TIA -- Andre PZP Enthusiast
D2 wrote at 2003-2-3 10:47 -0400:
in this line for data in self.aq_acquire('_getProductRegistryData')('zclasses'):
i suppose that aq_acquire returns the value of _getProductRegistryData of self but what is "'zclasses'" is it anargumet for the for loop or for the aq_acquire method ? I serached for the syntax of aq_acquire and for..in and i did'nt find this syntax for expression in (expression_list) (something_else): You search in the wrong direction....
"_getProductRegistryData" happens to be a function which you can call with "'zclasses'" as parameter. No magic related to "aq_acquire"... Dieter
Dieter Maurer a écrit:
D2 wrote at 2003-2-3 10:47 -0400:
in this line for data in self.aq_acquire('_getProductRegistryData')('zclasses'):
i suppose that aq_acquire returns the value of _getProductRegistryData
OK, the method itself is returned, not the value.
of self but what is "'zclasses'" is it anargumet for the for loop or for the aq_acquire method ? I serached for the syntax of aq_acquire and for..in and i did'nt find this syntax for expression in (expression_list) (something_else): You search in the wrong direction....
"_getProductRegistryData" happens to be a function which you can call with "'zclasses'" as parameter.
No magic related to "aq_acquire"...
Oh! so that means that the _getProductRegistryData is called (acquired) from self and that ('zclasses') is passed as a parameter. But why not using it that way : self._getProductRegistryData('zclasses) ?
Dieter
-- Andre
D2 wrote at 2003-2-4 09:26 -0400:
Oh! so that means that the _getProductRegistryData is called (acquired) from self and that ('zclasses') is passed as a parameter. But why not using it that way : self._getProductRegistryData('zclasses) ? Acquisition, by default, does not acquire names starting with "_".
You must explicitly call for acquisition in this case, with "aq_acquire". Dieter
participants (2)
-
D2 -
Dieter Maurer