zoukankan      html  css  js  c++  java
  • python隐含的特性

    本文源自(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
  • 相关阅读:
    nginx公网IP无法访问浏览器
    Internet接入方式
    Adobe Photoshop Lightroom 5.3和序列号
    getopt
    printf
    scanf
    cycling -avoid the vicious cycle
    ACE handle_timeout 事件重入
    Linux查看程序端口占用
    The GNU C Library
  • 原文地址:https://www.cnblogs.com/tom-zhao/p/4012638.html
Copyright © 2011-2022 走看看