简体   繁体   English

用于学习Django的Python 2.7或3.3

[英]Python 2.7 or 3.3 for learning Django

I am interested in learning Python but I don't know which version I should chose. 我有兴趣学习Python,但我不知道应该选择哪个版本。 When I Googled, I got answers posted over a year ago. 当我用Google搜索时,我得到了一年多前发布的答案。 If I want to learn Django, which version will be useful and will get support? 如果我想学习Django,哪个版本有用并且会得到支持?

Note that I know C, C++, Java and C#. 请注意,我知道C,C ++,Java和C#。

Django只对Python 3有实验支持,所以你现在必须使用Python 2.7。

First, a short comparison is It's Better than 2.7 and When should Python 3.3 become the default . 首先,简短的比较是它比2.7更好什么时候Python 3.3成为默认值 However, remember that Python is in fact a script language and you can use C or C++ in doing modules with new capabilities. 但是,请记住,Python实际上是一种脚本语言,您可以使用C或C ++来创建具有新功能的模块。

I would recommend to start with python 2.7, it just more commonly used nowadays, and django is written in 2.7 AFAIK. 我建议从python 2.7开始,它现在更常用,而django是用2.7 AFAIK编写的。

Apparently the answer you found still holds: 显然你找到的答案仍然存在:

Should we use python 2.6 or 2.7 or 3.x? 我们应该使用python 2.6或2.7或3.x吗?

If you already know several languages then learn both Python 2 and 3. The difference is small enough to allow many projects to support both versions using single (the same) source code. 如果您已经了解多种语言,那么可以学习Python 2和3.差异很小,允许许多项目使用单个(相同)源代码支持这两个版本。

For actual deployment you might prefer Python 2.7 if you need to use dependencies that are not ported to Python 3. 对于实际部署,如果需要使用未移植到Python 3的依赖项,则可能更喜欢Python 2.7。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM