Guido van Rossum wrote:
> Well, I don't recall what CLPython is, but I believe it is broken and
> that code should work -- there are (or used to be) examples of using
> exec to populate classes in the standard library so while it may look
> dodgy it really is exected to work...
I think this behavi
Ondrej Certik wrote:
Which works in CPython but fails in CLPython. From your answer it
seems to me that this code is not nice and we should not use it and
should rather use something like:
class Basic(AssumeMeths):
...
for k in AssumeMeths._assume_defined:
setattr(Basic, 'is_%s' % k, prope
Well, I don't recall what CLPython is, but I believe it is broken and
that code should work -- there are (or used to be) examples of using
exec to populate classes in the standard library so while it may look
dodgy it really is exected to work...
On Wed, Oct 8, 2008 at 4:40 PM, Ondrej Certik <[EMA
Hi Terry,
On Wed, Oct 8, 2008 at 9:17 PM, Terry Reedy <[EMAIL PROTECTED]> wrote:
> Willem Broekema wrote:
>>
>> The issue came up while trying to get some Sympy code running on CLPython.
>>
>> class C:
>> exec "a = 3"
>> print locals()
>>
>> 1. Is it guaranteed that class C gets an attribute "a"
Willem Broekema wrote:
The issue came up while trying to get some Sympy code running on CLPython.
class C:
exec "a = 3"
print locals()
1. Is it guaranteed that class C gets an attribute "a", i.e. that the
locals printed include {'a': 3}?
2. It it (also) guaranteed if it were in a function sco