Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #61771 > unrolled thread
| Started by | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| First post | 2013-12-13 09:35 +1100 |
| Last post | 2013-12-13 09:35 +1100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Code suggestion - List comprehension Ben Finney <ben+python@benfinney.id.au> - 2013-12-13 09:35 +1100
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Date | 2013-12-13 09:35 +1100 |
| Subject | Re: Code suggestion - List comprehension |
| Message-ID | <mailman.4038.1386887765.18130.python-list@python.org> |
Shyam Parimal Katti <spk265@nyu.edu> writes: > A semi-colon in the string value indicates the termination of a sql query. > So the expected out come is a conversion to a list of valid sql queries: > ['drop table sample_table;', 'create table sample_test (col1 int);', > 'select col1 from sample_test;'] I presume these strings are split from lines of input. If so, you would be better advised to use an SQL parsing library in the first place <URL:https://pypi.python.org/pypi/sqlparse/>, to get distinct SQL statements from a text stream. -- \ “We must find our way to a time when faith, without evidence, | `\ disgraces anyone who would claim it.” —Sam Harris, _The End of | _o__) Faith_, 2004 | Ben Finney
Back to top | Article view | comp.lang.python
csiph-web