首页 > 编程语言 > 详细

python隐含的特性

时间:2014-10-09 13:04:33      阅读:140      评论:0      收藏:0      [点我收藏+]

本文源自(http://stackoverflow.com/questions/101268/hidden-features-of-python)希望介绍Python非常有用,而比较忽视的Python用法。希望我和大家都写出高质量的python代码(查看PEP8)。本文是一个系列文章,环境为Python2.x。

  • Argument Unpacking
  • Braces
  • Chaining Comparison Operators
  • Decorators
  • Default Argument Gotchas / Dangers of Mutable Default arguments
  • Descriptors
  • Dictionary default .get value
  • Docstring Tests
  • Ellipsis Slicing Syntax
  • Enumeration
  • For/else
  • Function as iter() argument
  • Generator expressions
  • import this
  • In Place Value Swapping
  • List stepping
  • __missing__ items
  • Multi-line Regex
  • Named string formatting
  • Nested list/generator comprehensions
  • New types at runtime
  • .pth files
  • ROT13 Encoding
  • Regex Debugging
  • Sending to Generators
  • Tab Completion in Interactive Interpreter
  • Ternary Expression
  • try/except/else
  • Unpacking+print() function
  • with statement

python隐含的特性

原文:http://www.cnblogs.com/tom-zhao/p/4012638.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!