[issue20562] sqlite3 returns result set with doubled first entry

2014-02-08 Thread Johnny Wezel

New submission from Johnny Wezel:

I could isolate a bug where sqlite3 returns a result set from a select where 
the first entry occurs twice.

>>> sys.version_info  
sys.version_info(major=2, minor=7, micro=5, releaselevel='final', serial=0)
>>> import sqlite3
>>> sqlite3.version_info
(2, 6, 0)

$ uname -a
Linux 3.10.25-gentoo #1 SMP PREEMPT Wed Jan 29 18:05:47 CET 2014 x86_64 
Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz GenuineIntel GNU/Linux

--
components: Extension Modules
files: t.py
messages: 210622
nosy: jwezel
priority: normal
severity: normal
status: open
title: sqlite3 returns result set with doubled first entry
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file33992/t.py

___
Python tracker 
<http://bugs.python.org/issue20562>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26151] str(bytes) does __repr__() instead of __str__()

2016-01-19 Thread Johnny Wezel

New submission from Johnny Wezel:

str(b'xxx') returns "b'xxx'" instead of 'xxx'

--
components: Interpreter Core, Unicode
messages: 258583
nosy: ezio.melotti, haypo, jwezel
priority: normal
severity: normal
status: open
title: str(bytes) does __repr__() instead of __str__()
type: behavior
versions: Python 3.4

___
Python tracker 
<http://bugs.python.org/issue26151>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26151] str(bytes) does __repr__() instead of __str__()

2016-01-19 Thread Johnny Wezel

Johnny Wezel added the comment:

Bad feature, as it is a violation of POLA.

--

___
Python tracker 
<http://bugs.python.org/issue26151>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26151] str(bytes) does __repr__() instead of __str__()

2016-01-19 Thread Johnny Wezel

Johnny Wezel added the comment:

Who's talking about latin-1 in Python3? Of course str() needs to return 
decode('utf-8').

--

___
Python tracker 
<http://bugs.python.org/issue26151>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26151] str(bytes) does __repr__() instead of __str__()

2016-01-19 Thread Johnny Wezel

Johnny Wezel added the comment:

The other question is why one would want to run such a statement. This is 
almost certainly a bug in which case an error one would be better off with an 
exception.

--

___
Python tracker 
<http://bugs.python.org/issue26151>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26151] str(bytes) does __repr__() instead of __str__()

2016-01-19 Thread Johnny Wezel

Johnny Wezel added the comment:

> But this leads to uninspectable objects.

An inspection would be done with repr() which should not cause a problem.

Besides. the official and correct way of handling an ff character is to emit a 
Unicode replacement code, not to issue an exception. Another flaw in the whole 
story.

--

___
Python tracker 
<http://bugs.python.org/issue26151>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com