开发者

What are features considerd as advanced python? [closed]

开发者 https://www.devze.com 2022-12-19 09:42 出处:网络
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing
Closed. This question is opinion-based. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 2 years ago.

开发者_开发知识库 Improve this question

I do basic python programming and now I want to get deep into language features. I have collected/considered the following to be advanced python capabilities and learning them now.

  1. Decorator
  2. Iterator
  3. Generator
  4. Meta Class

Anything else to be added/considered to the above list?


First, this thread should be community wiki.

Second, iterators and generators are pretty basic Python IMHO. I agree with you on decorators and metaclasses. But I'm not a very good programmer, so I probably find this more difficult to wrap my brain around than others.

Third, I would add threading/multiprocessing to the list. That's really tricky :)


There are some useful core concepts that can be added to your list, and that I would not necessarily teach in an introductory Python class (from the most common to the more specific):

  • the various protocols (sequence, iterator, context,…)
  • properties
  • packages

Some points related to important standard modules:

  • Making your classes compatible with the standard copy and pickle modules.


The first 3 are intermediate Python, not advanced. For advanced add the stuff in the Importing Modules and Python Language Services sections of the library reference.


I think you'll find that there isn't a good answer to your question. What's great about Python is that all of its features are fairly easy to understand. But there's enough stuff in the language and the library that you never get around to learning it all. So it really boils down to which you've had occasion to use, and which you've only heard about.

If you haven't used decorators or generators, they sound advanced. But once you actually have to use them in a real-world situation, you'll realize that they're really quite simple, and wonder how you managed to live without them before.

0

精彩评论

暂无评论...
验证码 换一张
取 消