Nov-27-2019, 08:18 PM
Python already accepts an extra comma after the last item of a source sequence of expressions, such as forming a list:
another idea i have applies to having an "if" statement followed by a bunch of "elif" statements. the idea is to allow "elif" as an alternative of "if" for a similar reason... so the code generator does not have to check if this is the first.
mylist = [ 'foo', 'bar', ]that allows scripts that generate to need to deal with skipping the code that outputs the comma after the last item, for example.
another idea i have applies to having an "if" statement followed by a bunch of "elif" statements. the idea is to allow "elif" as an alternative of "if" for a similar reason... so the code generator does not have to check if this is the first.