Learning Python

Posted in Python at 2:52 pm by Chris

It’s interesting, picking up a new text and embarking on learning a new programming language. I have to admit, that I didn’t quite realize what I was getting myself into. :)

In the last week or so that I’ve been going through Learning Python by Mark Lutz & David Ascher, I’ve discovered that learning the Python programming language isn’t going to be something that I can “just pick up.” At least, not as easily as I did some other languages.

As an example, with JavaScript and ActionScript, I was learning both languages at the same time (more or less,) and was able to take things I had learned in either language and bounce them off the other language to understand more quickly how things worked. In the case of PHP, once I had the basic understanding of how the environment worked, the language itself was extremely familiar to me, being quite similar to other scripting languages such as ActionScript or the language used in developing MUDs. All I really had to worry about was learning some of the different environment variables that were available, and how some of the built-in objects worked.

In this case, the underlying principles behind the way Python works are familiar to me; it is implementing concepts that are common to most, if not all, of the scripting / programming languages that are out there. What is different, and what I realize is going to be my hurdle with this, is the way that the language is written. There appear to be a lot of nuances that I think I am going to take a little time picking up. The biggest one I think, will be the “meaning of whitespace.”

The other thing that is going to take me a little while to get my head around, I think, is that this language is much closer to something like C or C++ than I think I am used to. Where PHP, ActionScript, and JavaScript are strictly scripting languages that are more or less a layer of abstraction between the code that’s being written and the environment that you’re working in, Python (which still has some of that,) is much closer to the environment you’re working in, giving it a little more power and flexibility.

It is going to be a good thing, I believe, to be able to make use of this tool, both in my personal and professional endeavours. The only question that I think will trouble me in the future, once I get this language “picked up,” will be how to determine what language I will use for my backend project stuff; as yet, I’m not sure. :)

1 Comment »

  1. Bradley Peters said,

    March 8, 2006 at 6:54 pm

    The “meaningful whitespace” is probably the first thing that people notice about Python. I’m pretty sure Python isn’t the only language that has it, but it is definitely less common in the programming language world.

    I’m not sure I really understand what you mean about Python being closer to the environment. Standard python works more or less the same on all platforms. Some of the stuff in the os module is more specific though.

    A big difference between Python and something like PHP is that PHP is based on something that wasn’t really designed to be a programming language in the general sense. It has acquired some of that in its later life, but a language never really loses its founding assumptions.

    Python on the other hand was specifically designed from its very beginning by the person who is still responsible for guiding it’s design. That person is Guido van Rossum, known as the BDFL (Benevolent Dictator for Life) in the Python world. I suspect this may be why it seems more like C or C++ to you, because those are also (obviously) very intentionally designed languages.

Leave a Comment

You must be logged in to post a comment.