6
votes
0answers
243 views

return on negative condition vs if block [closed]

If I have a function which should perform an action on some condition, and returns null instead, which is cleaner: def func(): if not condition: return None [...] return asd or ...
5
votes
5answers
2k views

Class usage in Python

I write a lot of scripts in Python to analyze and plot experimental data as well as write simple simulations to test how theories fit the data. The scripts tend to be very procedural; calculate some ...
2
votes
0answers
714 views

What is the best way to learn and master Python, from a procedural programmer perspective? [closed]

I am Mathematician and I currently work mainly on Operations Research field, building algorithms for solving Mathematical Programming or Optimization problems. I learnt Fortran, Pascal and C (oh, and ...
0
votes
1answer
38 views

PyQt4: Which one of these would be better/more correct? (Notepad++ clone)

I'm making a super simple Notepad++ clone in Python/PyQt4, and I'm wondering which of these options of storing editor tab data: OPTION 1: I have a class called QQCodeTab, which stores the current ...