launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #02078
Re: [Merge] lp:~jtv/launchpad/recife-statistics-aftershock into lp:launchpad/db-devel
Thanks, I knew you'd find something. :-)
It may be my C/C++ background: self.now() has the side effect of advancing the simulated clock. Calling it twice in the same argument list would give me different two values when I really just want one, and moreover, it may not be defined which of the arguments would get which value. I don't _think_ it matters for these tests but I'm not sure.
(How does this relate to my background? Well, in C and C++, incurring two side effects on the same variable without a sequence point between them invites Undefined Behaviour. Which means that it would be perfectly standard-compliant for the compiler to produce a program that turned my computer into a flower pot on startup. I'm sure Python is more reasonable but the discipline, once acquired, runs deep.)
I agree that it doesn't make great reading though. What I can do is make it more consistent by assigning "now = self.now()" every time instead of writing "self.now()" in an arguments list. That'll make the throwaway nature of the variable clearer, and shorten the method calls to boot.
--
https://code.launchpad.net/~jtv/launchpad/recife-statistics-aftershock/+merge/42274
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jtv/launchpad/recife-statistics-aftershock into lp:launchpad/db-devel.
References