Re: "Exploding" (**myvariable) a dict with unicode keys

2009-06-04 Thread Aahz
In article , Samuel Wan wrote: > >I started using python last week and ran into exceptions thrown when >unicode dictionary keys are exploded into function arguments. In my >case, decoded json dictionaries did not work as function arguments. >There was a thread from Oct 2008 >(http://www.gossamer-

Re: "Exploding" (**myvariable) a dict with unicode keys

2009-06-02 Thread Samuel Wan
I started using python last week and ran into exceptions thrown when unicode dictionary keys are exploded into function arguments. In my case, decoded json dictionaries did not work as function arguments. There was a thread from Oct 2008 (http://www.gossamer-threads.com/lists/python/python/684379)

Re: "Exploding" (**myvariable) a dict with unicode keys

2008-10-04 Thread Martin v. Löwis
> Oh. I read somewhere that UTF-8 variable names we're supported. I > thought I even saw a colleague using Kanji. In source code (string literals, comments), surely. Not in variable names, not in 2.x. To rephrase Bruno's comment: Python supports UTF-8 as a source encoding. That doesn't mean that

Re: "Exploding" (**myvariable) a dict with unicode keys

2008-10-03 Thread Bruno Desthuilliers
Devin a écrit : (snip) Oh. I read somewhere that UTF-8 variable names we're supported. utf-8 is *not* unicode. -- http://mail.python.org/mailman/listinfo/python-list

Re: "Exploding" (**myvariable) a dict with unicode keys

2008-10-03 Thread Devin
On Oct 3, 2:29 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Devin wrote: > > On Oct 3, 1:57 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > >> "Martin v. Löwis" wrote: > >>> Devin wrote: > So Python can have unicode variable names but you can't > "explode" (**myvariable) a dict with un

Re: "Exploding" (**myvariable) a dict with unicode keys

2008-10-03 Thread Martin v. Löwis
Devin wrote: > On Oct 3, 1:57 pm, Peter Otten <[EMAIL PROTECTED]> wrote: >> "Martin v. Löwis" wrote: >>> Devin wrote: So Python can have unicode variable names but you can't "explode" (**myvariable) a dict with unicode keys? WTF? >>> That works fine for me. >> The OP probably means >> >>>

Re: "Exploding" (**myvariable) a dict with unicode keys

2008-10-03 Thread Devin
On Oct 3, 1:57 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > "Martin v. Löwis" wrote: > > Devin wrote: > >> So Python can have unicode variable names but you can't > >> "explode" (**myvariable) a dict with unicode keys? WTF? > > > That works fine for me. > > The OP probably means > > >>> def f(a=1):

Re: "Exploding" (**myvariable) a dict with unicode keys

2008-10-03 Thread Peter Otten
"Martin v. Löwis" wrote: > Devin wrote: >> So Python can have unicode variable names but you can't >> "explode" (**myvariable) a dict with unicode keys? WTF? > > That works fine for me. The OP probably means >>> def f(a=1): return a ... >>> f(**{"a": 42}) 42 >>> f(**{u"a": 42}) Traceback (most

Re: "Exploding" (**myvariable) a dict with unicode keys

2008-10-03 Thread Martin v. Löwis
Devin wrote: > So Python can have unicode variable names but you can't > "explode" (**myvariable) a dict with unicode keys? WTF? That works fine for me. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

"Exploding" (**myvariable) a dict with unicode keys

2008-10-03 Thread Devin
So Python can have unicode variable names but you can't "explode" (**myvariable) a dict with unicode keys? WTF? -Devin -- http://mail.python.org/mailman/listinfo/python-list