Skip to content

Instantly share code, notes, and snippets.

@markflorisson
Created July 14, 2015 18:27
Show Gist options
  • Save markflorisson/a912fdbad6a3c836774a to your computer and use it in GitHub Desktop.
Save markflorisson/a912fdbad6a3c836774a to your computer and use it in GitHub Desktop.
Cython issue
def f(term=b"12345"):
val = int('987278186585')
# The below line does not work, because it treats 1 as a constant integer
# in the C code (32 bit on my machine). Using 1L does work however.
val -= 1 << (len(term) * 8)
return val
print(f())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment