Please don't override built-ins in Python code examples


This is a general post about the Computer Science track, and CS102 in particular, although it may apply elsewhere. I wasn’t sure where to put it.

I’ve noticed a lot that the example code, and the code learners are expected to write, uses variables that override Python’s built-in variables and keywords. For example, in the Quicksort section (, the quicksort() function has a parameter called list; this overrides the Python built-in type list and makes it unusable inside the function. An earlier example - I don’t have a link anymore - overrode min, a built-in function.

While this doesn’t affect the operation of this specific function, it’s an incredibly bad habit to drill into students who are still learning the language, especially when it’s so easy to not do this. Please review the CS102 track, as well as other Python-based tracks, to ensure that when built-in variables and keywords are overridden, it’s necessary to the task at hand, and the student knows what’s going on and that this is not the usual habit of Python programmers.