Bruce wrote:
> In trying to compile the StdLib for a program, I kept running into an error 
> with
> BaseHTTPServer.py.  I've isolated it down to an issue with Dictionaries and
> tuples.
> 
> This code:
> 
> responses = {
>     100: ('Continue', 'Request received, please continue'),
>     }
> 
> Generates this error:
> Traceback (most recent call last):
>   File "pyc.py", line 159, in <module>
>   File "pyc.py", line 151, in Main
> SystemError: CompileToMethod cannot compile constant '('Continue',
> 'Request received, please continue')' because it is a non-trivial value, such 
> as
> a live object. Instead, create an expression tree that can construct this 
> value.
> 
> However, these constructs work fine:
> 
> x = ('Continue', 'Request received, please continue') responses = {
>     100: x,
>     }
> 
> responses = {
>     100: ('Continue'),
>     }
> 
> Is this a known issue?


I don't think this is a known issue, can you open a bug?  This regression was 
probably
caused by my addition of the ConstantDictionaryStorage which makes creation of
constant dictionaries really fast.  This expression probably just needs to be 
IExpressionSerializable.

_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to