A small kernel of code for playing with Galois fields of arbitrary characteristic
Revisión | 0aa4fe3bc7fa1b5faabfa3f10ed3ea9455a599d5 (tree) |
---|---|
Tiempo | 2016-04-17 09:56:13 |
Autor | Eric Hopper <hopper@omni...> |
Commiter | Eric Hopper |
Shorten a line.
@@ -80,8 +80,9 @@ | ||
80 | 80 | def __sub__(self, other): |
81 | 81 | if not self._compat_types(other): |
82 | 82 | return NotImplemented |
83 | - return self.__class__((((x + (prime_ - y)) % prime_) for (x, y) in \ | |
84 | - zip(self.val_, other.val_))) | |
83 | + return self.__class__((((x + (prime_ - y)) % prime_) \ | |
84 | + for (x, y) in \ | |
85 | + zip(self.val_, other.val_))) | |
85 | 86 | |
86 | 87 | def _intmul(self, other): |
87 | 88 | if other == 0: |