Use another augmented assignment statement
elfring opened this issue ยท 1 comments
elfring commented
๐ 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
elfring commented
๐ญ Do any factors hinder the wider application of functionality which became generally available with Python 2?