|
From: Jeremy H. <je...@al...> - 2001-03-12 20:06:48
|
>>>>> "SP" == Samuele Pedroni <pe...@in...> writes: SP> * CPython 2.1 introduces a symtable module that give access SP> to the scope info about variables, for the moment the interface SP> is experimental and related to the actual internals, I don't SP> know if it is worth to support (?) I don't think it's worth supporting yet. I'd like to improve the interface and make it a bit less implementation specific. Do you have any ideas on that subject? SP> I have found a small difference in how assert was already SP> implemented in jython and CPython: SP> this code does not raise an AssertionError under jython: SP> def f(): SP> __debug__=0 SP> assert 1!=0 SP> f() SP> CPython impl for assert check only the value for the SP> global/builtin __debug__ setting, there this code raise such an SP> exc. SP> Should this be changed to match CPython? I think it should. I've discussed this with Guido a few times. IIRC, he does intend for it work this way. I wonder if assignments to __debug__ should trigger a warning. Jeremy |