On Tuesday, 24 December 2019, Tim Daneliuk <i...@tundraware.com> wrote:
> If I do this: > > foo = [ "bar", "baz" "slop", "crud" ] > > Python silently accepts that and makes the middle term "bazslop". Strings concatinate over line endings so this case is only sensible really. > > BUT, if I do this: > > foo = [ "bar", "baz" 1, "crud" ] > > or this: > > foo = [ "bar", 2 1, "crud" ] > > The interpreter throws a syntax error. > > This is more of an intellectual curiosity than anything else, but why do > strings silently > concatenate like that, while all other case blow up with an error. i.e., > What is about > the language the promotes this behavior. At first blush, it seems > inconsistent, but what > do I know ... > > > > > -- > https://mail.python.org/mailman/listinfo/python-list > -- Independent Software Engineer and amateur Computer Scientist -- https://mail.python.org/mailman/listinfo/python-list