Filip-Ter/QSortTest — pull request #1 by dimazest (2014-04-20 20:23:12+00:00)
Title: Cleaning up python code.

Hi,

I've cleaned up the python code a bit.

* tabs are converted to spaces
* an array of Nones is not created anymore, instead, `init_array()` is a generator, which yields numbers in the file
* swap is note really needed.

I also tried pypy, which speeds this code:
```
[dimazest@mac QSortTest]$ time ./Qsort 6
Sorted 1000000 integers in C++.

real	0m1.167s
user	0m1.152s
sys	0m0.010s
[dimazest@mac QSortTest]$ time pypy Qsort.py 6
Sorted 1000000 ints in python.

real	0m1.403s
user	0m1.340s
sys	0m0.059s
[dimazest@mac QSortTest]$ time python3.3 Qsort.py 6
Sorted 1000000 ints in python.

real	0m6.006s
user	0m5.898s
sys	0m0.092s
[dimazest@mac QSortTest]$ time ./Qsort 7
Sorted 10000000 integers in C++.

real	0m11.809s
user	0m11.687s
sys	0m0.079s
[dimazest@mac QSortTest]$ time pypy Qsort.py 7
Sorted 10000000 ints in python.

real	0m8.798s
user	0m8.368s
sys	0m0.419s
[dimazest@mac QSortTest]$ time python3.3 Qsort.py 7
Sorted 10000000 ints in python.

real	1m17.750s
user	1m16.778s
sys	0m0.425s
```