Chris Angelico writes:
> I don't think str.upper() is the place for it; Python has a locale
> module that is a better fit for this.
Many would argue that (POSIX) locales aren't a good fit for
anything. :-)
I agree that it's kind of hard to see anything more complex than a
fixed table for the e
On Fri, Dec 23, 2022 at 06:02:39PM +0900, Stephen J. Turnbull wrote:
> Many would argue that (POSIX) locales aren't a good fit for
> anything. :-)
:-)
> I agree that it's kind of hard to see anything more complex than a
> fixed table for the entire Unicode repertoire belonging in str,
> though.
On Fri, 23 Dec 2022 at 21:02, Steven D'Aprano wrote:
>
> On Fri, Dec 23, 2022 at 06:02:39PM +0900, Stephen J. Turnbull wrote:
>
> > Many would argue that (POSIX) locales aren't a good fit for
> > anything. :-)
>
> :-)
>
> > I agree that it's kind of hard to see anything more complex than a
> > fix
On 23Dec2022 22:27, Chris Angelico wrote:
I think this would be a useful feature to have, although it'll
probably end up needing a LOT of information (you can't just say "give
me a locale-correct uppercasing of this string" without further
context). So IMO it should be third-party.
It would pr
On Sat, 24 Dec 2022 at 09:07, Cameron Simpson wrote:
>
> On 23Dec2022 22:27, Chris Angelico wrote:
> >I think this would be a useful feature to have, although it'll
> >probably end up needing a LOT of information (you can't just say "give
> >me a locale-correct uppercasing of this string" without
On 20/12/2022 09:16, Steven D'Aprano wrote:
On Mon, Dec 19, 2022 at 05:53:38PM -0800, Ethan Furman wrote:
Personally, every other time I've wanted to subclass a built-in data type,
I've wanted the built-in methods to return my subclass, not the original
class.
Caveat: If you were subclassi
On 24Dec2022 09:11, Chris Angelico wrote:
On Sat, 24 Dec 2022 at 09:07, Cameron Simpson wrote:
On 23Dec2022 22:27, Chris Angelico wrote:
>I think this would be a useful feature to have, although it'll
>probably end up needing a LOT of information (you can't just say "give
>me a locale-correct
On Sat, 24 Dec 2022 at 13:15, Cameron Simpson wrote:
> >wording that clarifies whether x.upper() uppercases the string
> >in-place?
>
> Well, it says "a copy", so I'd say it's clear.
>
My question was more: do you know, or do you have to look? I'll take
another example. Take the list.index() meth
On 24Dec2022 14:35, Chris Angelico wrote:
On Sat, 24 Dec 2022 at 13:15, Cameron Simpson wrote:
My question was more: do you know, or do you have to look? I'll take
another example. Take the list.index() method, which returns the index
where a thing can be found. *Without checking first*, answer
On Sat, 24 Dec 2022 at 15:00, Cameron Simpson wrote:
>
> On 24Dec2022 14:35, Chris Angelico wrote:
> >On Sat, 24 Dec 2022 at 13:15, Cameron Simpson wrote:
> >My question was more: do you know, or do you have to look? I'll take
> >another example. Take the list.index() method, which returns the i
On 24Dec2022 15:12, Chris Angelico wrote:
On Sat, 24 Dec 2022 at 15:00, Cameron Simpson wrote:
help(list.index) seems empty.
Huh that's strange. I'm checking this in a few recent versions, and
they all say "Return first index of value".
Ugh. It isn't empty. But on my local system the pager
11 matches
Mail list logo