A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-June/120254.html below:

[Python-Dev] PEP 362 Third Revision

[Python-Dev] PEP 362 Third Revision [Python-Dev] PEP 362 Third RevisionR. David Murray rdmurray at bitdance.com
Thu Jun 14 22:28:07 CEST 2012
On Thu, 14 Jun 2012 21:57:34 +0200, Antoine Pitrou <solipsis at pitrou.net> wrote:
> On Thu, 14 Jun 2012 12:46:38 -0700
> Ethan Furman <ethan at stoneleaf.us> wrote:
> > 
> > This is no different from what we have with strings now:
> > 
> > --> 'aA'.islower()
> > False
> > --> 'aA'.isupper()
> > False
> > --> 'a'.islower()
> > True
> > --> 'A'.isupper()
> > True
> > 
> > We know that a string cannot be both all-upper and all-lower at the same 
> > time;
> 
> We know that because it's common wisdom for everyone (although who knows
> what oddities the unicode consortium may come up with in the future).

Indeed, there is at least one letter that is used in both upper case and
lower case, so the consortium could reasonably declare that it should
return True for both isupper and islower :).

I'm not going to claim that there was that much foresight in the creation
of those two methods.  I will, however, note that we aren't perfectly
consistent in the application of our rules.

--David
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4