To be honest, Python was always a back-of-the-mind interest for me. First off, it was popular and is mentioned in just about every conversation about data science; something I’d dabbled in (a.k.a. I cleaned up some data and analysed it, #data-science /sarcasm). Though version 2 was still main stream, and version 3 apparently broke everything, there were pitch forks and witch hunts (I doubt there were, but there was a lot of muttering about version 3 not being compatible with 2 and how all the libraries would be broken). Anyway, I waited it out.
Ultimately, it was when version 3 became main-stream and version 2 was on the chopping block that I honestly thought the time was right. Version 3 cleaned up a lot of the bad of version 2. I think version 3 is more of the language that it should have been all along. It’s a clean language and full of libraries to do just about anything. It’s quite a good-looking language to boot.
So I took the plunge.
The rabbit hole deepened.
Now I like it a little.
Or maybe I like it quite a bit.
Actually, I like the language a lot. I mean, who couldn’t like anything inspired by Monty Python (granted, after version 2)? So I experimented with it and did a Udemy course (almost complete, #COVID-19 has derailed everything). I now know everything that there is to know. No, not really. I am scratching the surface. I like what I see, and I love the style of the language.
First off, indentation/white space is significant. It’s the first language I’ve used where indentation has real meaning. Okay, I did COBOL during my studies, but who writes that now? Although maybe I should dust that off as I believe COVID-19 has required a return of COBOL skills or something? Anyway, I digress. It’s interesting as indentation is the scope and there are no curly braces. At first, I thought I wouldn’t like it much, but it turns out it’s quite a pleasant way of writing code. Not only does the indentation make the code flow better, but you can actually see where the various scope levels are. It’s a readable language.
Look, it's early days so far and my history with new languages of late is patchy (I never seem to get going beyond a quick start; my foray in to Haskell and R comes to mind). I think this might be the one, though! I’ve even written a Toxic Bunny BAG file parser, and it’s not an awful implementation. Let it be known that it’s already a far better implementation than 1994-C-me. I’ve improved just mildly since then.
I’m still in the air about some class “magic” that happens. I’m used to first class constructors and properties and overriding. Having
def __str__(self): be a thing is a little weird right now. I don’t think it’s awful, but it is still a little weird. I don’t like “magic” in programming languages, but I’m sure I may get the hang of it; the “magic” will turn in to “it’s just how it works”.
Depends. I made most of my living off of C, C++, T-SQL, and C#. I doubt Python will usurp those languages in my income stream. Is it better than any of them? It’s hard to say. I think it’s a good language, but at least two of the four I listed are probably my go to languages should I ever head back to full-time development.
Is it a fun language? Hell yes.
Python is fun. Python is interesting. And Python has a lot of libraries for just about anything; from game development to data science to medical analysis. It’s unfortunately not the fastest language, but performance is not its primary criteria.
Anyway, please look forward to my new love affair (don’t tell my wife or kids) and wait for many new posts on the subject. Or not, you just never know with me…