On 13Sep2019 09:31, Matt Billenstein wrote:
On Fri, Sep 13, 2019 at 08:37:26AM +1000, Cameron Simpson wrote:
On 10Sep2019 10:42, Daniel Holth wrote:
[...]
> I stopped using Python 3 after learning about str(bytes) by finding it
> in
> my corrupted database. [...]
Could you outline how this ha
On Fri, Sep 13, 2019 at 08:37:26AM +1000, Cameron Simpson wrote:
> On 10Sep2019 10:42, Daniel Holth wrote:
> [...]
> > I stopped using Python 3 after learning about str(bytes) by finding it
> > in
> > my corrupted database. [...]
>
> Could you outline how this happened to you?
Not the OP, but I'
On Fri., 13 Sep. 2019, 7:21 am Steven D'Aprano, wrote:
> On Wed, Sep 11, 2019 at 09:34:07AM -0400, Daniel Holth wrote:
>
> > I didn't realize you could override __builtins__.str. That's interesting.
>
> Don't touch __builtins__ that's a CPython implementation detail. The
> public API is to ``impo
On 10Sep2019 10:42, Daniel Holth wrote:
[...]
I stopped using Python 3 after learning about str(bytes) by finding it
in
my corrupted database. [...]
Could you outline how this happened to you?
Cheers,
Cameron Simpson
___
Python-Dev mailing list --
On Wed, Sep 11, 2019 at 09:34:07AM -0400, Daniel Holth wrote:
> I didn't realize you could override __builtins__.str. That's interesting.
Don't touch __builtins__ that's a CPython implementation detail. The
public API is to ``import builtins`` and use that.
This override technique is called mon
Am 11.09.19 um 15:34 schrieb Daniel Holth:
It's different. One hint is that there's already an option to disable
the feature. The old style of error will occasionally reveal itself
with decode errors but the new style error happens silently, you
discover it somehow, then enable the -bb option
On Tue, Sep 10, 2019 at 8:38 PM Matt Billenstein wrote:
> On Tue, Sep 10, 2019 at 10:42:52AM -0400, Daniel Holth wrote:
> > I stopped using Python 3 after learning about str(bytes) by finding it
> in my
> > corrupted database. Ever since then I've been anxious about changing to
> the new
> > lang
On Tue, Sep 10, 2019 at 10:42:52AM -0400, Daniel Holth wrote:
> I stopped using Python 3 after learning about str(bytes) by finding it in my
> corrupted database. Ever since then I've been anxious about changing to the
> new
> language, since it makes it so easy to convert from bytes to unicode by
On 9/10/2019 2:12 PM, Chris Angelico wrote:
On Wed, Sep 11, 2019 at 12:47 AM Daniel Holth wrote:
On Sat, Jun 22, 2019 at 2:48 AM Serhiy Storchaka wrote:
22.06.19 01:08, Daniel Holth пише:
Thanks. I think I might like an option to disable str(bytes) without
disabling str != bytes. Unless th
On Wed, Sep 11, 2019 at 5:49 AM Ivan Pozdeev via Python-Dev
wrote:
>
> On 10.09.2019 21:12, Chris Angelico wrote:
> > On Wed, Sep 11, 2019 at 12:47 AM Daniel Holth wrote:
> >> On Sat, Jun 22, 2019 at 2:48 AM Serhiy Storchaka
> >> wrote:
> >>> 22.06.19 01:08, Daniel Holth пише:
> Thanks. I
On 10.09.2019 21:12, Chris Angelico wrote:
On Wed, Sep 11, 2019 at 12:47 AM Daniel Holth wrote:
On Sat, Jun 22, 2019 at 2:48 AM Serhiy Storchaka wrote:
22.06.19 01:08, Daniel Holth пише:
Thanks. I think I might like an option to disable str(bytes) without
disabling str != bytes. Unless the s
On Wed, Sep 11, 2019 at 12:47 AM Daniel Holth wrote:
>
> On Sat, Jun 22, 2019 at 2:48 AM Serhiy Storchaka wrote:
>>
>> 22.06.19 01:08, Daniel Holth пише:
>> > Thanks. I think I might like an option to disable str(bytes) without
>> > disabling str != bytes. Unless the second operation would also c
On Sat, Jun 22, 2019 at 2:48 AM Serhiy Storchaka
wrote:
> 22.06.19 01:08, Daniel Holth пише:
> > Thanks. I think I might like an option to disable str(bytes) without
> > disabling str != bytes. Unless the second operation would also corrupt
> > output.
> >
> > Came across this kind of set in the
22.06.19 01:08, Daniel Holth пише:
Thanks. I think I might like an option to disable str(bytes) without
disabling str != bytes. Unless the second operation would also corrupt
output.
Came across this kind of set in the hyper http library which uses a set
to accept certain headers with either
The answer bytes == str is just False. That doesn't put b'' in your
database by accident. It could be useful to separate the two kinds of
warnings.
On Fri, Jun 21, 2019, 18:57 Ivan Pozdeev via Python-Dev <
python-dev@python.org> wrote:
> On 22.06.2019 1:08, Daniel Holth wrote:
>
> Thanks. I think
On 22.06.2019 1:08, Daniel Holth wrote:
Thanks. I think I might like an option to disable str(bytes) without disabling str != bytes. Unless the second operation would also
corrupt output.
You can't compare str to bytes without knowing the encoding the bytes are supposed to be in (see
https://s
Thanks. I think I might like an option to disable str(bytes) without
disabling str != bytes. Unless the second operation would also corrupt
output.
Came across this kind of set in the hyper http library which uses a set to
accept certain headers with either str or bytes keys.
On Tue, Jun 18, 2019
On 18/06/2019 18.32, Daniel Holth wrote:
> set([u"foo", b"foo]) will error because the two kinds of string have the
> same hash, and this causes a comparison. Is that correct?
Yes, it will fail with -bb, because it turns comparison between str and
bytes into an error. This can also happen with oth
18 matches
Mail list logo