Having a way of importing a single class/function into the current file/module:
# ---------- A.py -------------
class MyClass:
...
def my_func():
...
# ---------- B.py -------------
from A import my_func
my_func()
The language support for named arguments, and variable number of arguments, specially when calling functions with many arguments:
def my_func(a, b, c=2):
print(a, b, c)
my_func(0, 1, 3)
# 0 1 3
my_func(0, 1)
# 0 1 2
my_func(0, b=2, c=4)
# 0 2 4
my_func(b=2, c=4, a=0)
# 0 2 4
The awareness in the community (and by extension in the documentation and other online resources) about how to handle bytes vs. strings in your program. Precious little other languages take care of talking about this.
The handling of negative indexes for lists, and the range()
method for
generating sequences. Some other languages have syntax for ranges, but they end
up being either more limited, or unfriendly in non-standard situations (I'm
looking at you and your handling of negative endpoints in ranges, Elixir.)
Also, IPython, and its automatic module reloading.