Message178189
| Author |
William.D..Colburn |
| Recipients |
William.D..Colburn, ezio.melotti |
| Date |
2012年12月26日.06:59:15 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1356505156.77.0.42259028203.issue16783@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
This seems to be just like issue6010, which is closed as "not as bug" which is simple irresponsible on the part of Python.
The problem is that I can store data into sqlite3 which cannot be retrieved. The data I encountered was a string with a \xa0 in it that was read from urllib2. I deposited that data into an sqlite3 database with no trouble at all. Later, however, sqlite3 would throw an exception when I tried to retrieve the data.
Martin v. Löwis says this is user error because sqlite3 assumes UTF-8. It makes no sense that storeable data cannot be retrieved and that the failure of sqlite3 is a user-error. If sqlite3 assumes UTF-8, then the error should have been caught when I did the store because I was not storing UTF-8 data. Accepting bad input and blaming the user later down the line is bad bug handling, especially because the two events might be separated by a tremendous gap of time and code which makes debugging quite hard. I was only able to find the errant character by popping the streamed webpage into emacs as both python and firefox showed me a normal looking string with nothing wrong with it. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年12月26日 06:59:16 | William.D..Colburn | set | recipients:
+ William.D..Colburn, ezio.melotti |
| 2012年12月26日 06:59:16 | William.D..Colburn | set | messageid: <1356505156.77.0.42259028203.issue16783@psf.upfronthosting.co.za> |
| 2012年12月26日 06:59:16 | William.D..Colburn | link | issue16783 messages |
| 2012年12月26日 06:59:15 | William.D..Colburn | create |
|