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
  • 相关阅读:
    16-1-6 kafka的操作
    16-1-5:MapReduce
    MapReduce概述
    MapReduce的代码实现过程分析
    MapReduce
    HDFS2—SequenceFile(小文件的解决方案)
    HDFS2—federation
    hdfs
    缓解爬虫ip被封的概率
    zookeeper集群搭建
  • 原文地址:https://www.cnblogs.com/tom-zhao/p/4012638.html
Copyright © 2011-2022 走看看