On Fri, Apr 16, 2010 at 12:57 AM, Alex Gaynor <alex.gay...@gmail.com> wrote:
> Hi all,
>
> I ran into the follow behavior while making sure Django works
> correctly on PyPy.  The following behavior was observed in all tested
> versions of CPython (2.5, 3.1):
>
>>>> def f(**kwargs):
> ...     print(kwargs)
> ...
>>>> kwargs = {1: 3}
>>>>
>>>> dict({}, **kwargs)
> {1: 3}
>>>> f(**kwargs)
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
> TypeError: f() keywords must be strings
>>>>
>
>
> This behavior seems pretty strange to me, indeed PyPy gives the
> TypeError for both attempts.  I just wanted to confirm that it was in
> fact intentional.

I ran into same issue with Django on Jython yesterday [1] since Jython
too gives TypeError for 'dict({}, **kwargs)'.

Thanks,
Raghu

[1] http://bugs.jython.org/issue1600
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to