PEP238 and zope

Guido van Rossum guido at python.org
Wed Jul 25 01:39:10 EDT 2001


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.

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-list mailing list