[CentralOH] Python Indentation problem
Brandon Rhodes
brandon at rhodesmill.org
Fri Apr 6 05:35:33 CEST 2012
Fandi Peng <fandi.814 at gmail.com> writes:
> How would you indent the following lines to meet PEP8
> python coding convention?
I'll try! :)
def win(self):
return (self.win_by_kill() or
self.win_by_reach() or
not self.get_available_moves(
(self.player + 1) % len(self.MARKS)
))
And the other expression:
end = self.FORWARD[(self.player + 1) % len(self.MARKS)]
my_sorted_moves = [ tuple(reversed(c)) for c
in my_reversed_src_dst[::end] ]
--
Brandon Rhodes brandon at rhodesmill.org http://rhodesmill.org/brandon
More information about the CentralOH
mailing list