On Sun, Feb 5, 2012 at 8:06 AM, Gustaf Nilsson <[email protected]> wrote:
> Ohoy
>
> yes, looks like this little fella is missing, although .isupper() is there.
> Tried to fix it myself, but it looks like that bit of code is JS and
> there i do not dare to go.
ugh - for me, it's not the javascript, it's the regular expressions :)
String.prototype.isupper = function() {
return (this.match(/[a-z]/g) === null);
};
does this look reasonable? is that it??
String.prototype.islower = function() {
return (this.match(/[A-Z]/g) === null);
};
> Will create a ticket in the bug tracker if nobody objects.
it'd be even more helpful if you could create and commit a LibTest
(in pure python), cut/paste the one for isupper, but add the bug
reference number "bug #NNN" into the assert string.
even better would be to track down python's regression test and/or
pypy's regression test and adapt/add that - no point making hard work.
l.