Is it advisable to go with Python 3.1 for a beginner? [duplicate]
Possible Duplicate开发者_如何转开发:
What version of Python should I use if I’m a new to Python?
Is it advisable to go with Python 3.1 for a beginner? Or are there any severe drawbacks I would have to consider?
3.1 is much simpler than 2.5 or 2.6, but currently suffers a severe dearth of third-party add-ons, environments supporting it (big apps using it for scripting, etc) and tools such as IDEs. So, much depends on what you want to learn Python for -- if just for personal edification, 3.1 is ideal; if it's to actually build or control applications, websites, etc, then 2.5 or 2.6 will serve you better at the present time (3.*
will no doubt reach and surpass 2.*
in the future, but, the future is not here yet;-).
Library support is a big issue, for now, until library developers develop their support for Python 3.x.
For example, here are some popular libraries that you might be interested in learning, that do not yet support Python 3.x:
- NumPy and SciPy
- Django
- wxPython
- PySide (free alternative to PyQt, see below)
Here are some libraries that do support Python 3.x:
- PyQt
Libraries with support in-progress:
- PyGame
A lot of the newer Python books target Python 3.x. You'll be learning the future!
But third party modules aren't necessarily Python 3.x ready... but if you're just learning programming that might not matter much anyway.
The only possible drawback that I can think of is that a lot of existing Python code and examples are written for Python 2.x and might not work in Python 3. But the changes that you need to make are usually quite small so you will soon get used to the slight differences.
If you are learning from a tutorial, make sure it is aimed at Python 3.x and not 2.x so that the examples run correctly.
Python is a good language for beginners. It is easy to get somthing up and running quickly. The language contains all the major programing techniques, such as OOP, etc, so you can learn both how to program and concepts with it.
Plenty of online tutorials:
- http://docs.python.org/dev/3.0/tutorial/
- https://stackoverflow.com/questions/207701/python-tutorial-for-total-beginners
On a side note, that this is an interpreted language, meaning there is no compiler/linker. So, IMO, it is easier to start writing code.
精彩评论