[pypy-dev] Unusual problem.

Maciek Fijalkowski fijal at genesilico.pl
Sat Jun 2 16:50:44 CEST 2007


Armin Rigo wrote:
> Hi Maciek,
>
> On Tue, May 29, 2007 at 06:44:19PM +0200, Maciek Fijalkowski wrote:
>   
>> termios.tcgetattr (and others as well) use termios.error for error 
>> reporting, which is exception which cannot be used in a translated 
>> version.
>>     
>
> Why not?
>
>
> Armin
>   
Because than, annotator complains  about except termios.error, e: e.args[1]

I fixed the bug with doing strange hacks in the module-initialization 
code, I've subclassed the exception and by temporarily re-raising it in 
module startup, I force e.args to be more regular, but this is a bit 
ugly trick (there is module/termios/__init__.py function startup for 
this purpose). Breaks for example compilemodule and it's ugly.

Cheers,
fijal





More information about the Pypy-dev mailing list