Author jmfauth
Recipients barry, jmfauth, ocean-city
Date 2008-08-18.14:51:07
SpamBayes Score 3.51612e-08
Marked as misclassified No
Message-id <1219071068.68.0.168654367901.issue2384@psf.upfronthosting.co.za>
In-reply-to
Content
Py3.0b2. This bug seems to be quite annoying. Especially when one works
with a main module importing modules which are importing modules and so
on, all modules having an encoding declaration. The Traceback (and the
user) is (are) a little bit lost.

---------
# -*- coding: cp1252 -*-
# modb.py

def fb():
    i = 1
    j = 0
    r =  i / j    
-----------
# -*- coding: cp1252 -*-
# moda.py

import modb

def fa():
    modb.fb()
-----------
# -*- coding: cp1252 -*-
# main.py

import moda

def main():
    moda.fa()

if __name__ == '__main__':
    main()
-----------

Running main.py leads to an

>c:\python30\pythonw -u "main.py"
(Traceback (most recent call last):
  File "main.py", line 11, in <module>
    
  File "main.py", line 8, in main
    
  File "C:\jm\jmpy3\moda.py", line 8, in fa
    
  File "C:\jm\jmpy3\modb.py", line 8, in fb
    
ZeroDivisionError: int division or modulo by zero
>Exit code: 1
History
Date User Action Args
2008-08-18 14:51:08jmfauthsetrecipients: + jmfauth, barry, ocean-city
2008-08-18 14:51:08jmfauthsetmessageid: <1219071068.68.0.168654367901.issue2384@psf.upfronthosting.co.za>
2008-08-18 14:51:07jmfauthlinkissue2384 messages
2008-08-18 14:51:07jmfauthcreate