一个极好的GitHub开源Python项目: What the f*ck Python! snake

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/gaoxueyi551/article/details/84786690

Python, being a beautifully designed high-level and interpreter-based programming language, provides us with many features for the programmer's comfort. But sometimes, the outcomes of a Python snippet may not seem obvious to a regular user at first sight.

Here is a fun project to collect such tricky & counter-intuitive examples and lesser-known features in Python, attempting to discuss what exactly is happening under the hood!

While some of the examples you see below may not be WTFs in the truest sense, but they'll reveal some of the interesting parts of Python that you might be unaware of. I find it a nice way to learn the internals of a programming language, and I think you'll find them interesting as well!

If you're an experienced Python programmer, you can take it as a challenge to get most of them right in first attempt. You may be already familiar with some of these examples, and I might be able to revive sweet old memories of yours being bitten by these gotchas sweat_smile

If you're a returning reader, you can learn about the new modifications here.

So, here we go...

Entry:

中文版

英文版

猜你喜欢

转载自blog.csdn.net/gaoxueyi551/article/details/84786690
今日推荐