What is PEP8’s E128: continuation line under-indented for visual indent?

PEP-8 recommends you indent lines to the opening parentheses if you put anything on the first line, so it should either be indenting to the opening bracket: urlpatterns = patterns(”, url(r’^$’, listing, name=”investment-listing”)) or not putting any arguments on the starting line, then indenting to a uniform level: urlpatterns = patterns( ”, url(r’^$’, listing, name=”investment-listing”), … Read more

Python `if x is not None` or `if not x is None`? [closed]

There’s no performance difference, as they compile to the same bytecode: >>> import dis >>> dis.dis(“not x is None”) 1 0 LOAD_NAME 0 (x) 2 LOAD_CONST 0 (None) 4 COMPARE_OP 9 (is not) 6 RETURN_VALUE >>> dis.dis(“x is not None”) 1 0 LOAD_NAME 0 (x) 2 LOAD_CONST 0 (None) 4 COMPARE_OP 9 (is not) 6 … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)