alan milligan wrote at 2003-11-2 14:13 +0000:
 > ...
 > I now desperately need to write a parser to convert all of these nasties to 
 > ZCurrency types.   I've come up with the following ExternalMethod - whereby 
 > I've defined a __currency__ attribute in each obselete incantation's product 
 > ...
 > def repair(container, counter=0):
 > ...
 >                 counter += 1
 > ...
 >             repair(object, counter)
 >     return counter
 > ...
 > However, it doesn't seem to find anything to convert.  Does anyone have any 
 > ideas?

"counter" is an integer and integers are immutable.
Therefore, "counter += 1" does not change the integer object
but assigns a new one to "counter". This change is local to
the "repair" incarnation. The "counter" in the caller is not changed.

-- 
Dieter

_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to