CERN / TIGRE

TIGRE: Tomographic Iterative GPU-based Reconstruction Toolbox
BSD 3-Clause "New" or "Revised" License
573 stars 188 forks source link

Remove setatr() and getatr() calls in python #279

Closed AnderBiguri closed 3 years ago

AnderBiguri commented 3 years ago

Most of the times they are not needed, so lets get rid of them for code clarity.

genusn commented 3 years ago

I searched for setattr and getattr, but in most (all?) of the cases, the attribute name seemed to be variables. Could you tell me which do you think you can remove for example?

AnderBiguri commented 3 years ago

@genusn I just realized many of them have gone thanks to a recent python code-quality merge! I am working on the branch for the demos and its not there yet, so I did not see it.

In any case, I strongly dislike the ones that use the variable contents, because it obfuscates code. But in fairness that is not for this Issue! sorry, doing everything too rushed.