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-
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)
> 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
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
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
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
>>
>>>
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):
"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
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
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
10 matches
Mail list logo