syntactically, the trailing comma is allowed , but it really means nothing. This is pretty much just a stylistic preference. I think most python programmers will not be able to disable it (this is a tip that I would also give), but some would prefer to make it easier to add extra arguments later.
. , :
x = foo(
arg1=whatever,
arg2=something,
arg3=blatzimuffin,
)
:
lst = [x, y, z,]
tup = (x, y, z)
tup = x,
, :
{
"top": [
"foo",
"bar",
"baz",
],
"bottom": [
"qux",
],
}
, / 1 , 2.