PEP238 and zope

Christian Tanzer tanzer at swing.co.at
Wed Jul 25 02:02:11 EDT 2001


barry at zope.com (Barry A. Warsaw) wrote:

> >>>>> "TJ" == Tom Jenkins <tjenkins at nospiced.ham.devis.com> writes:
> 
>     TJ> these snippets.  I don't believe zope will surface any
>     TJ> warnings that PEP238 stipulates (tho I may be wrong).  How do
>     TJ> we code _now_ so as to minimize our pain?
> 
> >>> must_be_int = 1 / 2
> >>> must_be_int
> 0
> >>> must_be_int = int(1.0 / 2.0)
> >>> must_be_int
> 0

This isn't portable behavior. According to the python library
reference, `int` may round on some platforms. 

-- 
Christian Tanzer                                         tanzer at swing.co.at
Glasauergasse 32                                       Tel: +43 1 876 62 36
A-1130 Vienna, Austria                                 Fax: +43 1 877 66 92




More information about the Python-list mailing list