http:// blog.csdn.net/pipisorry/article/details/44801859

How to become a proficient(熟练的) Python programmer如何成为Python高手

《如何成为Python高手》是Alain M. Lafon收集的一些文章摘要,总结主要集中在四个方面上:函数式编程、性能、测试、编码规范。如果一个程序员能把这些方面的内容知识都吸收消化,那他会有巨大收获。

Spoiler: This post is primarily gonna be an excerpt(摘录) of my bookmarks collection. That’s because more intelligent men than me have already written great articles on the topic of how to become a great Python programmer.

I will focus on four primary topics: Functional programming, performance, testing and code guidelines. When those four aspectsmerge(合并) in one programmer, he or she will gaingreatness(伟大) no matter what.

Functional programming函数式编程

Writing code in an imperative(必要的) style has become the defacto(事实上的) standard. Imperative programs consist of statements that describe change of state. While this might sometimes be a performant way of coding, it sometimes isn’t (for example for sake ofcomplexity(复杂)) – also, it probably is not the mostintuitive(直觉的) way when compared withdeclarative(宣言的) programming.

If you don’t know what I’m talking about, that’s great. Here are some starter articles to get your mind running. Butbeware(当心), it’s a little like the red pill
– once you tasted functional programming, you don’t want to go back.

  • http://www.amk.ca/python/writing/functional
  • http://www.secnetix.de/olli/Python/lambda_functions.hawk
  • http://docs.python.org/howto(基本知识的)/functional.html

Performance性能

There’s so much talk going on about how inefficient(无效率的) these ‘scripting languages’ (Python, Ruby, …) are, that it’s easy to forget that very often it’s the algorithm chosen by the programmer that leads to horrible runtime behaviour.

Those articles are a great place to get a feel for the ins and outs of Python’s runtime behaviour, so you can get your high performing application writting in a language that isconcise(简明的) and fun to write. And if your manager asks about Python’s performance, don’t forget to mention that the second largest search engine in the world is run by Python – namely Youtube(seePython quotes).

  • http://jaynes.colorado.edu/PythonIdioms.html
  • http://wiki.python.org/moin/PythonSpeed/PerformanceTips

Testing测试

Testing is probably one the most misjudged topics in computer science these days. Some programmers really got it andemphasize(强调) TDD(test driven development) and it’s successor BDD(behaviour driven development) whereever possible. Others simply don’t feel it yet and think it’s a waste of time. Well, I’m gonna be that guy and tell you: If you haven’t started out on TDD/BDD yet, you have missed out greatly!

It’s not about introducing a technology to replace that release management automaton(自动机) in your company that mindlessly clicks through the application once in a while, it is about giving you a tool to deeply understand your own problem domain – to reallyconquer(战胜),manipulate(操纵) and twist it the way you want and need it to be. If you haven’t yet, give it a shot. These articles will give you someimpulses(冲动):

  • http://www.oreillynet.com/lpt/a/5463
  • http://www.oreillynet.com/lpt/a/5584
  • http://wiki.cacr.caltech.edu/danse/index.php/Unit_testing_and_Integration_testing
  • http://docs.python.org/library/unittest.html

Code guidelines编码规范

Not all code is created equal. Some can be read and changed by any great programmer out there. But some can only be read and only sometimes changed by the original author – and that maybe only a couple of hours after he or she wrote it. Why is that? Because of missing test coverage (see above) and the lack of proper usage of coding guidelines.

These articles establish an absolute minimum to adhere(坚持) to. When you follow these, you will write more consise and beautiful code. As a side effect it will be more readable andadaptable(适合的) by you or anyone else.

  • http://www.python.org/dev/peps/pep-0008/
  • http://www.fantascienza.net/leonardo/ar/python_best_practices.html

from:http://blog.csdn.net/pipisorry/article/details/44801859

ref:http://blog.dispatched.ch/2011/06/12/how-to-become-a-proficient-python-programmer/

StarterLearningPython/n001.md

Functional Programming Patterns.pdf(BuildStuff '14)函数式编程
Python: Tips, Tricks and Idioms

Python高级编程技巧

python小技巧 - 如何成为Python高手相关推荐

  1. 用python画哆啦a梦的身体_每天一个Python小技巧,用Python 画个多啦A梦,小猪佩奇,文末还有Python入门学习视频...

    见网络上有人用Python 画出来个多啦A梦,很是新奇,来来来,我们看一下他们主要用到的库. 其实主要用的库就一个 turtle 库 先说明一下turtle绘图的基础知识: 1. 画布(canvas) ...

  2. python turtle绕原点旋转_每天一个Python小技巧,用Python 画个多啦A梦,小猪佩奇,文末还有Python入门学习视频

    见网络上有人用Python 画出来个多啦A梦,很是新奇,来来来,我们看一下他们主要用到的库. 其实主要用的库就一个 turtle 库 先说明一下turtle绘图的基础知识: 1. 画布(canvas) ...

  3. 收藏喜+1!值得使用的100个Python小技巧

    目前Python可以说是非常流行,在目前的编程语言中,Python的抽象程度是最高的,是最接近自然语言的,很容易上手. 你可以用它来完成很多任务,比如数据科学.机器学习.Web开发.脚本编写.自动化等 ...

  4. 快收藏!整理了 100 个 Python 小技巧

    作者:小F 来源: 法纳斯特 目前Python可以说是非常流行,在目前的编程语言中,Python的抽象程度是最高的,是最接近自然语言的,很容易上手. 你可以用它来完成很多任务,比如数据科学.机器学习. ...

  5. python hist函数_虎哥的python小技巧放送之绘制统计图(2)

    先放出第一期让大家回顾一下上次的内容 虎哥的python小技巧放送之绘制统计图(1) 第一期主要给大家讲了一些图形设置的东西.这一次开始正式带大家画图~ 折线图:折线图可以通过matplotlib中的 ...

  6. 3分钟学会python_3分钟学会一个Python小技巧

    Python时间日期转换在开发中是非常高频的一个操作,你经常会遇到需要将字符串转换成 datetime 或者是反过来将 datetime 转换成字符串. datetime 分别提供了两个方法 strp ...

  7. 分享几个Python小技巧函数里的4个小花招

    前面讲了很多内容都是关于python的变量,数据结构,下面我们来谈一谈python的函数.python里的函数知识点大概分为 基础的定义使用 , 作用域 和 参数传递 , 高级用法 ,其中参数传递最为 ...

  8. 一些你可能不知道的 Python 小技巧!

    [CSDN 编者按]Python 风头正盛,未来一段时间内想必也会是热门编程语言之一.因此,熟练掌握 Python 对开发者来说极其重要,说不定能给作为开发者的你带来意想不到的财富. 作者 | Seb ...

  9. python小技巧:一步步教你用Python实现

    python小技巧:一步步教你用Python实现2048小游戏 https://www.meipian.cn/2xywlpbv https://www.meipian.cn/2xywhexo http ...

  10. 不藏了!分享100个Python小技巧!!

    目前Python可以说是非常流行,在目前的编程语言中,Python的抽象程度是最高的,是最接近自然语言的,很容易上手. 你可以用它来完成很多任务,比如数据科学.机器学习.Web开发.脚本编写.自动化等 ...

最新文章

  1. P4568 [JLOI2011]飞行路线
  2. 通过Shell脚本将VSS项目批量创建并且提交迁移至Gitlab
  3. mysql 10 进制 转36_mysql 10进制与35进制之间的转换 注意Power处理bigint的问题
  4. 诵经嘴巴机器人入驻蓬皮杜艺术中心,MIT艺术家出品,网友:看到的第一眼我就想歪了...
  5. 数论练习(1)——取余运算(快速幂)
  6. 计算机usb共享网络泄密,杜绝USB泄密 MyUSBOnly
  7. SAP Spartacus focus directive增强之后的两次focus问题
  8. 园区交换网络和路由网络综合设计,测试完工啦
  9. listview属性_属性提取器:获取ListView即时更新其元素的最佳方法
  10. pytorch学习笔记(二十):Padding-And-Strides
  11. python计算器代码,Python实现两款计算器功能示例
  12. 初入python,被面试官问道,它的环境有几个。
  13. Android性能分析工具Systrace和TraceView的使用
  14. 关于HP M125-M126的无线链接方案
  15. linux安装vscode(中标麒麟+龙芯CPU)
  16. requests使用cookie模拟登陆豆瓣
  17. 计算机专业去空军地勤能干嘛,空军地勤退役后能干什么?
  18. 24点游戏的递归解法和Python实现
  19. perl应用:snp提取后续处理:非ATGC行的删除
  20. 零跑科技上市:募资超60亿港元 在港股PK“蔚小理”

热门文章

  1. ARM指令学习,王明学learn
  2. JavaScript如何获取css属性
  3. ios中怎么样调节占位文字与字体大小在同一高度
  4. 「2013-9-14」Change Remote Desktop Port
  5. [转]用C#编写ActiveX控件
  6. (维基百科LaTeX公式显示异常)解决方法
  7. bzoj 1078 [SCOI2008]斜堆 —— 斜堆
  8. 为什么磁盘慢会导致Linux负载飙升?
  9. 手机端输入键盘导致 position fixed
  10. ServletContext的应用