PEP238 and zope

Tom Jenkins tjenkins at nospiced.ham.devis.com
Wed Jul 25 09:50:49 EDT 2001


Guido van Rossum wrote:

> Tom Jenkins <tjenkins at nospiced.ham.devis.com> writes:
> 
> 
>>We're a zope shop.  Its quite possible that the work we do now will be 
>>still in use for many years (not guaranteed but we still use code now 
>>that we wrote 2 years ago - before it was zope ;) )
>>
>>We use Python Methods in Zope... python snippets stored directly in 
>>zope's zodb.  grepping *.py won't find any of these snippets.  I don't 
>>believe zope will surface any warnings that PEP238 stipulates (tho I may 
>>be wrong).  How do we code _now_ so as to minimize our pain?
>>
> 
> I find it hard to believe that you use much division is Zope scripts,
> but if you do, use divmod(x, y)[0] for int division and x*1.0/y for
> float division.
> 
> However, Zope typically comes with its own Python version, so all you
> need to do is not upgrade the Zope version you are using.  Also, I
> believe that Zope is typically much more aggressive in breaking old
> code, so you wouldn't want to upgrade your Zope anyway if you had a
> lot of old code around that you couldn't afford to maintain.
> 


Yes zope is typically much more aggressive in breaking old zope code, 
but the breakage is typically in the security mechanisms not in the 
underlying fundamentals.  It also means I have to try and minimize the 
effects.  Quite frankly I thought python code in our Python Methods was 
safe.

my-naivete-astonishes-even-me-sometimes-ly yours

Tom






More information about the Python-list mailing list