.editorconfig
author Pulkit Goyal <7895pulkit@gmail.com>
Wed, 31 May 2017 23:48:52 +0530
changeset 32635 a8262b7784f9
parent 28793 d30fdd6d1bf7
child 38293 1d6066336d7b
permissions -rw-r--r--
py3: replace None with -1 to sort an integer array In Python 2: >>> ls = [4, 2, None] >>> sorted(ls) [None, 2, 4] In Python 3: >>> ls = [4, 2, None] >>> sorted(ls) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unorderable types: NoneType() < int() Therefore we replaced None with -1, and the safe part is that, None and -1 are only the keys which are used for sorting so we don't need to convert the -1's back to None.

# See http://EditorConfig.org for the specification

root = true

[*.py]
indent_size = 4
indent_style = space
trim_trailing_whitespace = true

[*.{c,h}]
indent_size = 8
indent_style = tab
trim_trailing_whitespace = true