SQL – the dark side

Sometimes your RDBMS does not allow you to do certain changes like updating a table without using a WHERE clause that uses a key column. When you are really sure what you want to do: SET SQL_SAFE_UPDATES = 0; Now the dirty brown magic can begin! Back to the SQL-Tutorial

Python 3 – there shall be just int

Trying to contribute to the Flask plugin flask-login I just added these lines: if isinstance(duration, (int, long)): duration = timedelta(seconds=duration) Looking quite plausible, isn’t it? But lo and behold: it doesn’t work under Python 3.x. Dang! The reason: Python 2 has two integer types: int and long. In Python 3 there is only int, which…