views:

217

answers:

4

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?

+2  A: 

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.

Ignacio Vazquez-Abrams
I'm not sure if decorator and meta class is considered intermediate. We rarely use it in day to day programming unless we are making a framework.
jpartogi
"metaclass" is not part of the "first 3". It's definitely advanced, in that it's tricky to grasp, and easy to misuse.I agree that decorator (as in writing them) IS intermediate. Maybe it's only required when making a framework, but any non-trivial app ends up making its own framework.
ddaa
+3  A: 

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 :)

Tim Pietzcker
added as community wiki.
Gopalakrishnan Subramani
Hey, I thought when a question is community wiki, the answers are too. Obviously not, so I changed my answer to cw, too.
Tim Pietzcker
+2  A: 

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):

Some points related to important standard modules:

  • Making your classes compatible with the standard copy and pickle modules.
EOL
+1  A: 

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.

DNS