dfm/emcee

Use another augmented assignment statement

elfring opened this issue ยท 1 comments

๐Ÿ‘€ Some source code analysis tools can help to find opportunities for improving software components.
๐Ÿ’ญ I propose to increase the usage of augmented assignment statements accordingly.

diff --git a/src/emcee/autocorr.py b/src/emcee/autocorr.py
index 7962451..bb53645 100644
--- a/src/emcee/autocorr.py
+++ b/src/emcee/autocorr.py
@@ -13,7 +13,7 @@ def next_pow_two(n):
     """Returns the next power of two greater than or equal to `n`"""
     i = 1
     while i < n:
-        i = i << 1
+        i <<= 1
     return i
 
 

๐Ÿ’ญ Do any factors hinder the wider application of functionality which became generally available with Python 2?