Python notes: Part I

Introduction

There is nothing better to start with it than the official introduction:

Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms.

I will discuss most of these features in the next section

Some Python’s features

  • Open source: Python is a very permissive, free and open source software licensed under a GPL compatible license. It is based on the concept of a community which shares knowledge, and this is one of the reasons why Python is one of the most (if I don’t say the most) good programming language.
  • Easy to learn: Python is designed to be easy to learn programming language with a very simple syntax and semantics. Python is extremely easy to get started with. Indeed, you can learn the basics of Python in few weeks.
  • High level language: Python is a very-high-level programming language: Python programs is 3 to 5 times smaller than Java programs. So, using Python will increase the productivity.
  • Simple: Python is very simple. It’s designed to be easy to read. A common problem in most programming language is: “It’s harder to read code than write it”. Hopefully, Pythonic have not this problem.
  • Object oriented: Python supports procedure-oriented programming as well as object-oriented programming. Python has a very powerful but simplistic way of doing OOP, especially when compared to C++ or Java.
  • Interpreted: Python unlike C, C++ or C# does not require compilation, You just run the program directly from the source code, which make Python much more portable.
  • Dynamic: Python is a dynamic typing programming language, which let new code to be executed on the fly without limitations. This is very useful in science and engineering

 

Advertisements

Good bye Bazaar and Launchpad !

The transition from OpenERP to Odoo comes with an excellent new technique:

Get rid of BZR!

The really good news is the abandonment of Bazaar and Launchpad, which were a serious handicap. The merger of the three bazaar branches into only 1 Git repository should be able to speed up things and facilitate the contribution. Even if the contribution process is not yet well defined on github,  but it would be highly desirable if it will be organized around a merges’s rise model, like the Linux kernel.

Saving time and disk space

Clone a repository from github takes a lot less time than recovering a bazaar branch on Launchpad. In addition to time savings, it also save disk space. Here is a comparison of the sizes of deposits:
OpenERP in BZR
openobject-server 154 Mo
openobject-addons 692 Mo
openerp-web 33 Mo
Odoo (Github)
Odoo 432 Mo
The only thing that we lose with git is the notion of shared repository of Bzr.