On Thu, Mar 15, 2018 at 9:06 AM, Kyle Lahnakoski <klahnako...@mozilla.com> wrote: > I did use implicit concatenation for a long SQL statement, and a few > long error messages, but the byte savings is not worth the increased bug > density. > >> self.db.execute( >> "CREATE TABLE files (" + >> " bucket TEXT," + >> " key TEXT," + >> " name TEXT," + >> " last_modified REAL," + >> " size INTEGER," + >> " annotate TEXT, " + >> " CONSTRAINT pk PRIMARY KEY (bucket, name)" + >> ")" >> ) > > is almost identical to > >> self.db.execute( >> "CREATE TABLE files (" >> " bucket TEXT," >> " key TEXT," >> " name TEXT," >> " last_modified REAL," >> " size INTEGER," >> " annotate TEXT, " >> " CONSTRAINT pk PRIMARY KEY (bucket, name)" >> ")" >> ) > > It looks like I am in the market for a linter that prevents implicit > string concatenation!
Even better: self.db.execute(""" CREATE TABLE files ( bucket TEXT, key TEXT, name TEXT, last_modified REAL, size INTEGER, annotate TEXT, CONSTRAINT pk PRIMARY KEY (bucket, name) ) """) ChrisA _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/