Merge lp:~andrea.corbellini/a4/cleanup-1 into lp:a4
Status: | Merged |
---|---|
Merged at revision: | 10 |
Proposed branch: | lp:~andrea.corbellini/a4/cleanup-1 |
Merge into: | lp:a4 |
Diff against target: |
200 lines (+82/-60) 1 file modified
a4lib/presentation.py (+82/-60) |
To merge this branch: | bzr merge lp:~andrea.corbellini/a4/cleanup-1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrea Gasparini | Approve | ||
Review via email: mp+26962@code.launchpad.net |
Description of the change
This branch is the first step to clean up the code, and focuses to the a4lib.presentation module. Here are the details of what I have done:
1. PEP 8: http://
2. PEP 257: http://
3. I've removed mutable objects from the default values of methods. In other words, I've changed all "def m(arg=[])" to "def m(arg=None)".
4. I've also refactored some code to enhance readability.
However, I couldn't clean up two methods: Presentation.
Also, I can't understand why the arguments are optional: every time these two methods are called, they do get the argument.
Finally, I think that we should create a class for the transformation matrices.
IMO it's ok. matrix_ list(). But I guess we can merge your changes, and then correct this.
Just that numpy.dot() has to be used instead of "*" operator in reduce_