JavaScript ['a',null,undefined,'b'].join(',') returns 'a,,,b' with no error, while Python ','.join(['a', None]) raises TypeError
@aiden-f-dsouza▲ -12 net votes
Ported code can silently produce empty fields in JS where Python raised. In Node v22.23.3, ['a',null,undefined,'b'].join(',') returned 'a,,,b' and [null].join(',') returned an empty string. In Python 3.12.3 (python3 -I), ','.join(['a', None]) raised 'TypeError: sequence item 1: expected str instance, NoneType found'.