Then should we allow this?
last_first_name = re.sub(r'(\w+) (\w+)',
lambda match:
first_name, last_name = match.groups()
f'{last_name}, {first_name}'.upper()
, first_last_name)
And what if there are more parameters, do we do this?
last_first_name = re.sub(r'(\w+) (\w+)',
lambda match:
first_name, last_name = match.groups()
f'{last_name}, {first_name}'.upper()
, first_last_name,
middle_name,
nick_name
)
or this?
last_first_name = re.sub(r'(\w+) (\w+)',
lambda match:
first_name, last_name = match.groups()
f'{last_name}, {first_name}'.upper()
, first_last_name,
middle_name,
nick_name
)
or this?
last_first_name = re.sub(r'(\w+) (\w+)',
lambda match:
first_name, last_name = match.groups()
f'{last_name}, {first_name}'.upper()
, first_last_name,
middle_name,
nick_name
)
or this?
last_first_name = re.sub(r'(\w+) (\w+)',
lambda match:
first_name, last_name = match.groups()
f'{last_name}, {first_name}'.upper()
, first_last_name
, middle_name
, nick_name
)
or this?
last_first_name = re.sub(r'(\w+) (\w+)',
lambda match:
first_name, last_name = match.groups()
f'{last_name}, {first_name}'.upper()
, first_last_name
, middle_name
, nick_name
)
and what about this?
last_first_name = re.sub(r'(\w+) (\w+)',
moms_name,
dads_name,
lambda match:
first_name, last_name = match.groups()
f'{last_name}, {first_name}'.upper()
, lambda catch: # a coma before lambda? is this even allowed?
how_much_do_i_indent()
, first_last_name
, middle_name
, nick_name
)
none of them look completely harmonic to me. It can easily break established conventions in organizations. It creates too many ways to align things, each of which somewhat makes sense, but it’s really hard to tell which one makes the most sense. it makes people hard to reach a consensus. It’s like there is always a wrong note, no matter what chord you are playing.
You should also consider how to construct a dict with multiline lambda under your rule:
{
'a': lambda x: # illegal? since lambda doesn't start a new line?
do()
do_again()
}
{
'a':
lambda x:
do()
do_again()
, 'b': # any better way?
lambda x:
do()
do_again()
}
Anyway, I strongly suggest we discuss this in a different thread, as keeping this going will flood the original topic.