bazelbuild / starlark

Starlark Language
Apache License 2.0
2.38k stars 158 forks source link

Note that sorted(reverse) must be a boolean #237

Closed ndmitchell closed 1 year ago

ndmitchell commented 1 year ago

Currently the spec says that if reverse is True, then the sort is reversed. But it doesn't say what happens if it's a truthy non-boolean (e.g. 1). Looking at Python, it allows either a boolean or a number (probably for reverse compat), but in the interest of a sensibly implemented subset, suggest we require this to be boolean.