Python
Summary of Lovely Python 2009091601
0大体浏览了一下书籍:
1.学习态度:以用治学。Just use it! Don’t learn!
2.阅读态度:不要试图通过本书成为合格的Python程序员。当做“下饭的老醋花生”。
3.精髓:The Zen of Python, by Tim Peters.
所以,《Learning Python》还是要仔细研究的,毕竟它被成为白米饭(主食)啊。哈哈。另外《Byte of Python》也要看看,简明的教程可以让我对Python立马有个形象在脑子里。
运行代码非常重要,尝试去修改代码更为重要,这是最重要的学习方法之一。
学习计算机和学习一门外语差不多,重要的是要“用”!!!
Start to be Pythonic
0离Pythonic还差得远,但是万里长征总要迈出第一步的。今天买了本《可爱的Python》,试试这个“下饭”的菜啥味道(注:原书序中的说法)。作者都是CPyUG的高手们。估计内容不会让人失望的。
要努力靠谱,做个Pythonic行者。Wish myself good luck.
Start with Python 2.x or Python 3.x from the Offical Site
0Note that both Python 2.6 and 3.1 are considered stable production releases, but if you don’t know which version to use, start with Python 2.6 since more existing third party software is compatible with Python 2 than Python 3 right now.
If you’re just learning to program now, you’ll have an easier time if you stick to the officially sanctioned features of Python, rather picking up bad habits from deprecated back roads. There aren’t many of them in Python 2 compared to some other languages, but if you want to be safe, Python 3 was meant to eliminate as many of those as possible. You’ll get a similar benefit if you follow the official Python 2.6 tutorial first, before reading introductory Python books that were written before Python 2.6 was released.
To be super specific, these are the things that you should try to stay up to date on:
1. Unicode support in strings
2. “New-style” versus “old-style” classes
3. The “with” statement, and context managers
4. Generator functions and expressions, versus list comprehensions and plain ol’ for loops
If you watch out for these, and read the “What’s New in Python X.Y” documents for each version between the one you started on and the newest release, the transition shouldn’t be too hard.
The projects you’re depending on may also offer some hints about when they’ll do the 3.X transition. SciPy depends on Numpy, which depends heavily on the Python 2.X C extension API and will take a long time to convert. Django is basically pure Python and can probably convert sooner. GAE is Google’s infrastructure and will probably be 2.X for years.