Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #50955
| Date | 2013-07-20 06:06 -0400 |
|---|---|
| From | Devyn Collier Johnson <devyncjohnson@gmail.com> |
| Subject | Re: Share Code Tips |
| References | (1 earlier) <51e97e6e$0$29971$c3e8da3$5496439d@news.astraweb.com> <51E9B8EB.5060007@Gmail.com> <kscgv5$gv9$1@ger.gmane.org> <51E9E237.2040903@Gmail.com> <kscqf0$429$1@ger.gmane.org> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4911.1374314778.3114.python-list@python.org> (permalink) |
On 07/19/2013 09:51 PM, Dave Angel wrote: > On 07/19/2013 09:04 PM, Devyn Collier Johnson wrote: >> > > <snip> >>> >> Chris Angelico said that casefold is not perfect. In the future, I want >> to make the perfect international-case-insensitive if-statement. For >> now, my code only supports a limited range of characters. Even with >> casefold, I will have some issues as Chris Angelico mentioned. Also, "ß" >> is not really the same as "ss". >> > > Sure, the casefold() method has its problems. But you're going to > avoid using it till you can do a "perfect" one? > > Perfect in what context? For "case sensitively" comparing people's > names in a single language in a single country? Perhaps that can be > made perfect. For certain combinations of language and country. > > But if you want to compare words in an unspecified language with an > unspecified country, it cannot be done. > > If you've got a particular goal in mind, great. But as a library > function, you're better off using the best standard method available, > and document what its limitations are. One way of documenting such is > to quote the appropriate standards, with their caveats. > > > By the way, you mentioned earlier that you're restricting yourself to > Latin characters. The lower() method is inadequate for many of those > as well. Perhaps you meant ASCII instead. > Of course not, Dave; I will implement casefold. I just plan to not stop there. My program should not come across unspecified languages. Yeah, I meant ASCII, but I was unaware that lower() had some limitation on Latin letters. Mahalo, DCJ
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Share Code Tips Devyn Collier Johnson <devyncjohnson@gmail.com> - 2013-07-19 09:51 -0400
Re: Share Code Tips Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-07-19 17:59 +0000
Re: Share Code Tips Devyn Collier Johnson <devyncjohnson@gmail.com> - 2013-07-19 18:08 -0400
Re: Share Code Tips Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-07-20 03:18 +0000
Re: Share Code Tips Devyn Collier Johnson <devyncjohnson@gmail.com> - 2013-07-20 06:07 -0400
Re: Share Code Tips Chris Angelico <rosuav@gmail.com> - 2013-07-20 09:08 +1000
Re: Share Code Tips Dave Angel <davea@davea.name> - 2013-07-19 19:09 -0400
Re: Share Code Tips Devyn Collier Johnson <devyncjohnson@gmail.com> - 2013-07-19 21:04 -0400
Re: Share Code Tips Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-07-20 03:44 +0000
Re: Share Code Tips David Hutto <dwightdhutto@gmail.com> - 2013-07-20 00:15 -0400
Re: Share Code Tips David Hutto <dwightdhutto@gmail.com> - 2013-07-20 00:22 -0400
Re: Share Code Tips David Hutto <dwightdhutto@gmail.com> - 2013-07-20 00:26 -0400
Re: Share Code Tips David Hutto <dwightdhutto@gmail.com> - 2013-07-20 00:27 -0400
Re: Share Code Tips Devyn Collier Johnson <devyncjohnson@gmail.com> - 2013-07-20 06:10 -0400
Re: Share Code Tips Devyn Collier Johnson <devyncjohnson@gmail.com> - 2013-07-20 08:36 -0400
Re: Share Code Tips Chris Angelico <rosuav@gmail.com> - 2013-07-20 11:13 +1000
Re: Share Code Tips Dave Angel <davea@davea.name> - 2013-07-19 21:51 -0400
Re: Share Code Tips David Hutto <dwightdhutto@gmail.com> - 2013-07-19 23:42 -0400
Re: Share Code Tips Devyn Collier Johnson <devyncjohnson@gmail.com> - 2013-07-20 06:06 -0400
Re: Share Code Tips Devyn Collier Johnson <devyncjohnson@gmail.com> - 2013-07-20 08:20 -0400
csiph-web