What they didn't tell me about Python...
Data model and other concepts
I've been programming Python for a few years, and during the last month of my Pythonic journey, I've come across many high-points.
Some of these begin with popping the hood and looking in.
While Python acts very differently from statically-typed compiled languages (I'm thinking C/C++ or Java), the basic mechanisms are all there.
Here are some of my recent favourites:
- So you know to override __init__(self), but there are so many other special methods that tutorials never really cover!
__new__, __del__, __lt__, __eq__, __hash__, __str__, __getattr__, descriptors, type emulation (e.g. __call__) and on and on... - I constantly use Closures in Python, without even thinking about it. This is the kind of thing that makes Python arguably the most intuitive programming language for it's power.
- I think James Powell should revive his blog of two years ago, where he stopped in the midst of a wonderful series on implicit 'self' in Python. Who's with me?
- Thousands of code recipes, hosted by ActiveState. Who needs the book?
Application
You know that "acts very differently" I mentioned? Here's what it's useful for -- making fantastically complicated computation look ridiculously straight-forward.
- @Michael Halls-Moore of @QuantStart.com uploaded an amazingly accessible article which exemplifies the ease of use of Python to scrape and store market data.
I highly recommend it for anyone looking to fool around with such things, or just as another Pythonic tour de force.
This is a couple of years old, mind you. - @Eli Bendersky puts out some amazingly easy-to-follow pieces like this one, about harnessing the GPU. Dated 3 and a half years ago, but very relevant.
- SciPy 2015: Scientific Computing with Python Conference
playlist courtesy of @Enthought
If any of these help anyone, I'd love to hear it!
Senior Consulting Engineer at MongoDB
9 年I had some time to play with Django recently, and I find it so much stronger than other WebDev frameworks I've tested. Combine it with NodeJS and you've got a beast, can't wait to dive deeper into Python.