[Python-ideas] Re: Custom string prefixes

2019-08-31 Thread Steven D'Aprano
On Thu, Aug 29, 2019 at 02:10:21PM -0700, Andrew Barnert wrote: [...] > And most of the string affixes people have suggested are for > string-ish things. I don't think that's correct. Looking back at the original post in this thread, here are the motivating examples: [quote] There are quite a

[Python-ideas] Re: Custom string prefixes

2019-08-31 Thread Chris Angelico
On Sat, Aug 31, 2019 at 8:44 PM Steven D'Aprano wrote: > > So b"abc" should not be allowed? > > In what way are byte-STRINGS not strings? Unicode-strings and > byte-strings share a significant fraction of their APIs, and are so > similar that back in Python 2.2 the devs thought it was a good idea

[Python-ideas] Re: Custom string prefixes

2019-08-31 Thread Steven D'Aprano
On Sat, Aug 31, 2019 at 09:31:15PM +1000, Chris Angelico wrote: > On Sat, Aug 31, 2019 at 8:44 PM Steven D'Aprano wrote: > > > So b"abc" should not be allowed? > > > > In what way are byte-STRINGS not strings? Unicode-strings and > > byte-strings share a significant fraction of their APIs, and are

[Python-ideas] Re: Custom string prefixes

2019-08-31 Thread Steven D'Aprano
On Thu, Aug 29, 2019 at 11:19:58PM +0100, Rob Cliffe via Python-ideas wrote: > Just curious:  Is there any reason not to make decimal.Decimal a > built-in type? Yes: it is big and complex, with a big complex API that is over-kill for the major motivating use-case for a built-in decimal type. T

[Python-ideas] Re: Custom string prefixes

2019-08-31 Thread Chris Angelico
On Sun, Sep 1, 2019 at 10:47 AM Steven D'Aprano wrote: > > On Sat, Aug 31, 2019 at 09:31:15PM +1000, Chris Angelico wrote: > > On Sat, Aug 31, 2019 at 8:44 PM Steven D'Aprano wrote: > > > > So b"abc" should not be allowed? > > > > > > In what way are byte-STRINGS not strings? Unicode-strings and