123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|454|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> On Topic -> Why Python?

Sun, 17 Jun 2012, 22:20
jedimastersterli
A simple question really.

Every programming language is good at something, so why was Python invented?

Since I've been on here last I've mastered C (which isn't saying much) and have a working knowledge of Java though I still haven't touched C++ in years. I'm looking to take a free online course on introduction to AI but they want you to understand Python. Hence the question 'What is it good for?' and also how hard is it to learn comparative to C and Java?
Mon, 18 Jun 2012, 03:00
steve_ancell
Python is supposed to be easy to learn, the same way that BASIC was a beginners language one computers during the 1980s, Python is now the beginners language on the Raspberry Pi.
Mon, 18 Jun 2012, 03:03
steve_ancell
This is said to be a good editor for Python.

www.geany.org/
Mon, 18 Jun 2012, 03:07
Afr0
Python is easier to learn than C. It is a scripting language.
I don't know why it was invented, but scripting languages are good for "static code" that doesn't need to be recompiled.
In Project Dollhouse, I use Lua to define the look of the game's UI, and calling functions when buttons are pressed etc.
Also, I highly doubt you've "mastered" C. I wouldn't say you've "mastered" C until you know the ins and outs of every function in the standard library.

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!
Mon, 18 Jun 2012, 05:58
steve_ancell
Afr0 I highly doubt you've "mastered" C. I wouldn't say you've "mastered" C until you know the ins and outs of every function in the standard library.

That is so true, no two programmers are the same so programming languages constantly evolve to fit their needs.

|edit| Although it may be possible to learn a programming lingo from end to end, there are endless possibilities of ways to use it.

For example: anybody can pick up a brush, dip it in paint and apply it to a wall but having two P&D's on the same wall will result in two different finishes, feel free to jump in Dabz. |edit|

Mon, 18 Jun 2012, 09:34
JL235
According to Wikipedia, Python was created as a successor to ABC, for the Amoeba OS. It was an OS that could allow a whole network of machines look like a single PC.

It's main success is through open source, where it's been used for a range of GPL applications, such as Blender. It's also pretty much always included on Linux desktop distributions as standard.

In short, Python aims to be readable and easy to use for building real applications. However it also became popular at around the start of a trend into dynamic languages (PHP, Perl, Ruby, and tonnes more). It's about trying to make it easier to build complex software.

Tbh C is a pretty easy language to understand; it's building sophisticated and bug free software where the code scales which is the challenge. In short, Python has more concepts.

If you've used other dynamic and object-oriented languages, Python shouldn't be too difficult to pickup. If you haven't, then you might have difficulties. However you ought to learn both dynamic, and OO languages anyway, even if you chose to never use them. It'll help to give you more ideas to work with when working in other languages.

Afr0 Also, I highly doubt you've "mastered" C. I wouldn't say you've "mastered" C until you know the ins and outs of every function in the standard library.


I totally disagree. That is like saying a history expert needs to learn the date of every event in history. Understanding history is much more then just dates, and understanding a language is more then just learning function signatures. It goes deeper than that.
Mon, 18 Jun 2012, 10:01
Afr0
It goes deeper than that.


You may be right, but even so - saying you've "mastered" a language sounds arrogant, even when the interpretation of "mastered" is pretty subjective.

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!
Mon, 18 Jun 2012, 10:53
steve_ancell
I think a more fitting word to use here would be "competent" rather than "mastered", that would still mean that jedimastersterling knows his stuff.
Tue, 19 Jun 2012, 04:42
Retro
I don't get why they want you to know Python for introductory AI. Learning Lisp or Prolog would make more sense.
Tue, 19 Jun 2012, 05:20
JL235
I expect it's to avoid having to teach a whole new paradigm of programming. If this is aimed at people who can already program, then learning Python won't be difficult, and so most of the time can be spent on the AI.

Prolog can be *very* challenging for even an experienced programmer.
Tue, 19 Jun 2012, 14:56
Retro
I assumed that an understanding of Python was a prerequisite.
Wed, 20 Jun 2012, 00:36
JL235
Then there you go, a lot more programmers will already know Python or something similar.