Python-implied features

Source: Internet
Author: User

This article originates from the Python usage (Http://stackoverflow.com/questions/101268/hidden-features-of-python) that you would like to introduce Python as very useful and more overlooked. Hopefully I and everyone will write high-quality Python code (see PEP8). This article is a series of articles, the environment for 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
  • .pthFiles
  • ROT13 Encoding
  • Regex debugging
  • Sending to Generators
  • Tab completion in Interactive interpreter
  • Ternary Expression
  • try/except/else
  • unpacking+ print() function
  • withStatement

Python-implied features

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.