Closed
Description
Allow initial comma.
Final comma works:
t = (
1,
2,
)
x = [
1,
2,
]
y = {
1,
2,
}
z = {
1:11,
2:22,
}
def fun(
a,
b,
):
pass
Initial comma does not work:
t = (
, 1
, 2
)
x = [
, 1
, 2
]
y = {
, 1
, 2
}
z = {
, 1:11
, 2:22
}
def fun(
, a
, b
):
pass
To make the syntax symmetric in this regard
gives more freedom to format the code.
I occasionally found the restriction an unnecessary nuisance.
Before writing a PEP,
I would like to discuss,
- whether something like that has been proposed already?
- what counter-arguments there could be?
Metadata
Metadata
Assignees
Labels
No labels