| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| if i want to make a string downcase, is upper().swapcase() the onyl choice? there is no downer() ? |
|
#2
| |||
| |||
| On Wed, Aug 27, 2008 at 11:16 AM, ssecorp <circularfunc@gmail.com> wrote: > if i want to make a string downcase, is upper().swapcase() the onyl > choice? there is no downer() ? There is no "downer" indeed, instead it is named "lower". > -- > http://mail.python.org/mailman/listinfo/python-list > -- -- Guilherme H. Polo Goncalves |
|
#3
| |||
| |||
| On Aug 27, 3:16 pm, ssecorp <circularf...@gmail.com> wrote: > if i want to make a string downcase, is upper().swapcase() the onyl > choice? there is no downer() ? lower() You need to be careful ssecorp, you might be at risk of being considered a troll -- always give the benefit though (probably why I'm broke!) Jon. |
|
#4
| |||
| |||
| ssecorp wrote: > if i want to make a string downcase, is upper().swapcase() the onyl > choice? what you're asking for is usually called "lower case": http://en.wikipedia.org/wiki/Lower_case and the corresponding string method method is called "lower": >>> "HELLO".lower() 'hello' > there is no downer() ? no, that would be no fun at all. </F> |
|
#5
| |||
| |||
| ssecorp wrote: > if i want to make a string downcase, is upper().swapcase() the onyl > choice? there is no downer() ? If you are not being a troll, there are two easy ways to answer such a question. >>> dir('') ['__add__', '__class__', '__contains__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__gt__', '__hash__', '__init__', '__iter__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '_formatter_field_name_split', '_formatter_parser', 'capitalize', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'index', 'isalnum', 'isalpha', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] followed by >>> help(''.lower) Help on built-in function lower: lower(...) S.lower() -> str Return a copy of the string S converted to lowercase. OR >>> help(str) which gives screenfuls of info including the above. tjr |
|
#6
| |||
| |||
| On Aug 28, 9:53 am, Terry Reedy <tjre...@udel.edu> wrote: > ssecorp wrote: > > if i want to make a string downcase, is upper().swapcase() the onyl > > choice? there is no downer() ? > > If you are not being a troll, there are two easy ways to answer such a > question. > [snip] Reading the manual backwards as the OP seems to have done ("upper", "swapcase", ...) one finds: """ swapcase( ) Return a copy of the string with uppercase characters converted to lowercase and vice versa. """ Out of the possible diagnoses (trolling, incredible stupidity, feeble joke attempt) of the cause of the ensuing upper/downer question, I'm going with the third. |
|
#7
| |||
| |||
| On Wed, Aug 27, 2008 at 5:28 PM, John Machin <sjmachin@lexicon.net> wrote: > On Aug 28, 9:53 am, Terry Reedy <tjre...@udel.edu> wrote: >> ssecorp wrote: >> > if i want to make a string downcase, is upper().swapcase() the onyl >> > choice? there is no downer() ? >> >> If you are not being a troll, there are two easy ways to answer such a >> question. >> > > [snip] > > Reading the manual backwards as the OP seems to have done ("upper", > "swapcase", ...) one finds: > > """ > swapcase( ) > > Return a copy of the string with uppercase characters converted to > lowercase and vice versa. > """ > > Out of the possible diagnoses (trolling, incredible stupidity, feeble > joke attempt) of the cause of the ensuing upper/downer question, I'm > going with the third. > > -- > http://mail.python.org/mailman/listinfo/python-list > I was going to go with not particularly strong in English. To someone not familiar with English, downer() could very well be the obvious converse of upper(). I'm usually quick to think "troll" but this time I didn't. Maybe I'm just naive. -- Stand Fast, tjg. [Timothy Grant] |
|
#8
| |||
| |||
| On Aug 28, 10:28 am, John Machin <sjmac...@lexicon.net> wrote: > Out of the possible diagnoses (trolling, incredible stupidity, feeble > joke attempt) of the cause of the ensuing upper/downer question, I'm > going with the third. Never ascribe to humour that which can be adequately explained by increadible stupidity! On the other hand given up/down vs. high/low, upper/downer might appear logical to someone who doesn't know that "downcase" is called 'lowercase.' |
|
#9
| |||
| |||
| On Aug 28, 11:25 am, Asun Friere <afri...@yahoo.co.uk> wrote: > On Aug 28, 10:28 am, John Machin <sjmac...@lexicon.net> wrote: > > > Out of the possible diagnoses (trolling, incredible stupidity, feeble > > joke attempt) of the cause of the ensuing upper/downer question, I'm > > going with the third. > > Never ascribe to humour that which can be adequately explained by > increadible stupidity! On the other hand given up/down vs. high/low, > upper/downer might appear logical to someone who doesn't know that > "downcase" is called 'lowercase.' He knows that s.upper().swapcase() does the job, without having read the swapcase docs where it is screamingly obvious that lowercase is the antonym of uppercase??? |
|
#10
| |||
| |||
| On 2008-08-28, Timothy Grant <timothy.grant@gmail.com> wrote: > I was going to go with not particularly strong in English. To > someone not familiar with English, downer() could very well be > the obvious converse of upper(). Not only does one need to be familiar with English, but one also has to be familiar with somewhat obscure terms dervied from ancient typsetting practices. In other contexts, downer is definitely the obvious converse of upper. -- Grant |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.