Python论坛  - 讨论区

标题:[python-chinese] 关于yield

2005年02月18日 星期五 23:36

刘鑫 march.liu at gmail.com
Fri Feb 18 23:36:09 HKT 2005

jian wang 写道:

>有谁用过yield这个关键字,支持多线程吗?
>  
>

没有研究过源码,从我接触的文档来看,这个语法不支持多线程,需要多线程的话
要自己编写同步代码。

>	
>
>        致
>礼!
> 				
>
>        jian wang
>        wangjian5748 at 163.com
>          2005-02-18
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>python-chinese list
>python-chinese at lists.python.cn
>http://python.cn/mailman/listinfo/python-chinese
>  
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20050218/be9fcc6a/attachment.html

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2005年02月18日 星期五 23:54

limodou limodou at gmail.com
Fri Feb 18 23:54:07 HKT 2005

应该是不支持。

刘鑫 wrote:
> jian wang 写道:
> 
>>有谁用过yield这个关键字,支持多线程吗?
>>  
>>
> 
> 没有研究过源码,从我接触的文档来看,这个语法不支持多线程,需要多线程的话 
> 要自己编写同步代码。
> 
>>	
>>
>>        致
>>礼!
>> 				
>>
>>        jian wang
>>        wangjian5748 at 163.com
>>          2005-02-18
>>  
>>
>>------------------------------------------------------------------------
>>
>>_______________________________________________
>>python-chinese list
>>python-chinese at lists.python.cn
>>http://python.cn/mailman/listinfo/python-chinese
>>  
>>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> python-chinese list
> python-chinese at lists.python.cn
> http://python.cn/mailman/listinfo/python-chinese

-- 
I love python!
My Blog: http://www.donews.net/limodou


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2005年02月19日 星期六 00:13

cry zyqmail at 163.net
Sat Feb 19 00:13:23 HKT 2005

python,您好!

我准备了一个UNICODE字符串,里面又中文又数字,在socket下用send()方法送,居然出现encode错误,难道send是不能发送unicode吗?

        from types import StringType, UnicodeType
        ss = s+"\r\n"
        print isinstance(ss, UnicodeType)
        self._sock.send(ss)

True

UnicodeEncodeError: 'ascii' codec can't encode characters in position 34-36: ordinal not in range(128)

谁知道这个问题怎么解决吗?

看来PYTHON不在核心代码中解决字符编码是不行的。

                    致
礼!

            cry
            zyqmail at 163.net




[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2005年02月19日 星期六 09:25

Chun Lin Zhang chun_lin_zhang at hotmail.com
Sat Feb 19 09:25:12 HKT 2005

~{V'3V~}concurrent processing

>From: limodou <limodou at gmail.com>
>Reply-To: python-chinese at lists.python.cn
>To: python-chinese at lists.python.cn
>Subject: Re: [python-chinese] ~{9XSZ~}yield
>Date: Fri, 18 Feb 2005 23:54:07 +0800
>
>~{S&8CJG2;V'3V!#~}
>
>~{AuvN~} wrote:
> > jian wang ~{P45@~}:
> >
> >>~{SPK-SC9}~}yield~{Ub8v9X<|WV~},~{V'3V6`O_3LBp~}?
> >>
> >>
> >
> > 
>~{C;SPQP>?9}T4Bk#,4SNR=S4%5DND55 at 4?4#,Ub8vSo7(2;V'3V6`O_3L#,PhR*6`O_3L5D;0~}
> > ~{R*WT<:1`P4M,2=4zBk!#~}
> >
> >>
> >>
> >>~{!!!!!!!!!!!!!!!!VB~}
> >>~{@q#!~}
> >>
> >>
> >>~{!!!!!!!!!!!!!!!!~}jian wang
> >>~{!!!!!!!!!!!!!!!!~}wangjian5748 at 163.com
> >>~{!!!!!!!!!!!!!!!!!!!!~}2005-02-18
> >>
> >>
> >>------------------------------------------------------------------------
> >>
> >>_______________________________________________
> >>python-chinese list
> >>python-chinese at lists.python.cn
> >>http://python.cn/mailman/listinfo/python-chinese
> >>
> >>
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > python-chinese list
> > python-chinese at lists.python.cn
> > http://python.cn/mailman/listinfo/python-chinese
>
>--
>I love python!
>My Blog: http://www.donews.net/limodou
>_______________________________________________
>python-chinese list
>python-chinese at lists.python.cn
>http://python.cn/mailman/listinfo/python-chinese

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2005年02月19日 星期六 10:27

limodou limodou at gmail.com
Sat Feb 19 10:27:51 HKT 2005

与线程安全是一回事吗?

Chun Lin Zhang wrote:
> 支持concurrent processing
> 

-- 
I love python!
My Blog: http://www.donews.net/limodou


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号