Python 3K还是Python 2.9? [英] Python 3K or Python 2.9?

查看:40
本文介绍了Python 3K还是Python 2.9?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Python用户和拥护者Bruce Eckel对Python 3中增加(或缺少添加)的内容感到失望:

http://www.artima.com/weblogs/viewpo...?thread=214112

Python user and advocate Bruce Eckel is disappointed with the
additions (or lack of additions) in Python 3:

http://www.artima.com/weblogs/viewpo...?thread=214112

推荐答案

TheFlyingDutchman< zz ****** @ aol.comwrites:
TheFlyingDutchman <zz******@aol.comwrites:

Python用户和拥护者Bruce Eckel对Python 3中增加(或缺少添加)的增加感到失望:

http://www.artima.com/weblogs/viewpo...?thread=214112



那篇文章相当薄弱。

That article is pretty weak.


Paul Rubin< http:// ph **** @ NOSPAM.invalidwrites:
Paul Rubin <http://ph****@NOSPAM.invalidwrites:

TheFlyingDutchman< zz ****** @ aol.comwrites:
TheFlyingDutchman <zz******@aol.comwrites:

Python用户和拥护者Bruce Eckel对Python 3中增加(或缺少添加)的内容感到失望:

http://www.artima.com/weblogs/viewpo...?thread=214112



那篇文章相当薄弱。


That article is pretty weak.



Guido在这里回复:


回复Bruce Eckel

< URL:http://www.artima.com/weblogs/viewpost.jsp?thread = 214325>


-

\ 吃意大利食物的麻烦是五六天|

` \\\\\\\\\\\\\\\\\\\\\\\ - George Miller |
_o__)|

Ben Finney

It is responded to by Guido here:

"A Response to Bruce Eckel"
<URL:http://www.artima.com/weblogs/viewpost.jsp?thread=214325>

--
\ "The trouble with eating Italian food is that five or six days |
`\ later you''re hungry again." -- George Miller |
_o__) |
Ben Finney


9月12日下午2:14, Ben Finney< bignose + hates-s ... @ benfinney.id.au>

写道:
On Sep 12, 2:14 pm, Ben Finney <bignose+hates-s...@benfinney.id.au>
wrote:

Paul Rubin< http ://phr...@NOSPAM.invalidwrites:
Paul Rubin <http://phr...@NOSPAM.invalidwrites:

TheFlyingDutchman< zzbba ... @ aol.comwrites:
TheFlyingDutchman <zzbba...@aol.comwrites:

Python用户和倡导者Bruce Eckel对Python 3中的增加(或缺少添加)增加感到失望:
Python user and advocate Bruce Eckel is disappointed with the
additions (or lack of additions) in Python 3:


> http://www.artima.com/weblogs/viewpo...?thread=214112


文章相当薄弱。
That article is pretty weak.



Guido在这里回复:


回复Bruce Eckel

< URL:http://www.artima.com/weblogs/viewpost.jsp?thread = 214325>


It is responded to by Guido here:

"A Response to Bruce Eckel"
<URL:http://www.artima.com/weblogs/viewpost.jsp?thread=214325>



在那篇博客中,Guido说:


""""看来我们现在好了愉快地在这里探索。我是

期待基准测试显示PP或类似的(或者不是b $ b不同!)解决方案实际上提供了性能提升。另一个

路由我想看到探索的是将一个这样的解决方案整合到一个现有的Web框架(或者可能是WSGI中间件)中,以便网络

应用程序有一个简单的方法,无需重新设计他们的

架构。""


也许我不完全明白哪里Guido来自,但

解决方案,用于在多个流程中传播Web应用程序

已经在mod_python等解决方案中长期使用

和mod_fastcgi。为了进一步改进这些解决方案

mod_wsgi也已创建。


所有这些解决方案都使用网络的多进程特性

服务器,或者他们自己使用多个守护程序进程,Apache将分发请求

。最终结果是可以更好地使用多个处理器或多核机器的
。另外,当使用多个b / b线程的Apache工作者MPM时,因为很多东西甚至都没有在
Python代码中完成,比如静态文件服务,多个核心甚至可以

在同一过程中使用。因此,在如何实现Apache以及Web应用程序提供的更大背景下,GIL并不是一个大问题,因为有些人会相信它是至于阻止

正确使用机器资源。


FWIW,我在上面发表了自己对Guido评论的回复:

http://blog.dscpl.com.au/2007/09/par...d-modwsgi.html


多年来我见过很多Python开发人员显示

非常不喜欢使用与Apache集成的Python。结果

人们似乎想要做的最后一件事就是修复这些解决方案并且

让它们更好地工作。现实是,除非用Apache托管Python的非常好的b $ b解决方案出现,否则你可能会看到
永远不会看到Python的廉价商品虚拟主机。较旧的解决方案

根本无法安全使用或难以设置和管理。


创建大量不同的Python流程并代理它们,就像纯粹主义者想要看到的那样,只是不会发生这样的事情。

设置太难以管理并且在大型资源上消耗太多资源br />
规模。网络托管公司想要一些简单的东西,他们可以将b
整合到他们现有的PHP专注的Apache安装中,并且b
$ b不会嚼掉大量的额外资源,从而

强制降低其网站密度。为此,我们仍然有一个方法可以去。


我的一个较旧的博客文章,我已经解决了这些问题:

http: //blog.dscpl.com.au/2007/07/com...d-modwsgi.html


Graham

In that blog, Guido says:

"""Concurrency: It seems we''re now happily out exploring here. I''m
looking forward to benchmarks showing that PP or similar (or
dissimilar!) solutions actually provide a performance gain. Another
route I''d like to see explored is integrating one such solution into
an existing web framework (or perhaps as WSGI middleware) so that web
applications have an easy way out without redesigning their
architecture."""

Maybe I don''t fully understand where Guido is coming from, but
solutions for spreading web applications across multiple processes
have been available for a long time in solutions such as mod_python
and mod_fastcgi. With a view to improving further on these solutions
mod_wsgi has also been created.

All these solutions either use the multi process nature of the web
server, or themselves use multiple daemon processes to which requests
are distributed by Apache. End result is that one can make better use
of multi processor or multi core machines. Also, when using multi
threaded Apache worker MPM, because a lot of stuff is not even done in
Python code, such as static file serving, multiple cores can even be
used within the same process. Thus, in the larger context of how
Apache is implemented and what web applications provide, the GIL isn''t
as big a problem as some like to believe it is as far as preventing
proper utilisation of the machines resources.

FWIW, I have blogged my own response to Guido''s comment above at:

http://blog.dscpl.com.au/2007/09/par...d-modwsgi.html

Now over the years I have seen a lot of Python developers showing
quite a dislike for using Python integrated with Apache. As a result
the last thing people seem to want to do is fix such solutions up and
make them work better. Reality is though that unless a very good
solution for hosting Python with Apache comes up, you will probably
never see good cheap commodity web hosting for Python. Older solutions
simply aren''t safe to use or are hard to set up and manage.

Creating lots of distinct Python processes and proxying to them, like
the purists would like to see, simply isn''t going to happen as such
setups are too hard to manage and use up too much resources on a large
scale. Web hosting companies want something simple which they can
integrate into their existing PHP focused Apache installations and
which don''t chew up huge amounts of additional resources, thereby
forcing a reduction in their site densities. To that end, we still
have a way to go.

An older blog entry of mine where I have covered these problems is:

http://blog.dscpl.com.au/2007/07/com...d-modwsgi.html

Graham


这篇关于Python 3K还是Python 2.9?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆