473,396 Members | 1,836 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

no string.downer() ?

if i want to make a string downcase, is upper().swapcase() the onyl
choice? there is no downer() ?
Aug 27 '08 #1
15 3053
On Wed, Aug 27, 2008 at 11:16 AM, ssecorp <ci**********@gmail.comwrote:
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
Aug 27 '08 #2
On Aug 27, 3:16 pm, ssecorp <circularf...@gmail.comwrote:
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.
Aug 27 '08 #3
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>

Aug 27 '08 #4


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

Aug 27 '08 #5
On Aug 28, 9:53 am, Terry Reedy <tjre...@udel.eduwrote:
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.

Aug 28 '08 #6
On Wed, Aug 27, 2008 at 5:28 PM, John Machin <sj******@lexicon.netwrote:
On Aug 28, 9:53 am, Terry Reedy <tjre...@udel.eduwrote:
>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]
Aug 28 '08 #7
On Aug 28, 10:28 am, John Machin <sjmac...@lexicon.netwrote:
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.'
Aug 28 '08 #8
On Aug 28, 11:25 am, Asun Friere <afri...@yahoo.co.ukwrote:
On Aug 28, 10:28 am, John Machin <sjmac...@lexicon.netwrote:
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???
Aug 28 '08 #9
On 2008-08-28, Timothy Grant <ti***********@gmail.comwrote:
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
Aug 28 '08 #10


Grant Edwards wrote:
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.
Nonsense. Down is the opposite of up, but lower is the opposite of upper
as an adjective: upper level, lower level; upper class, lower class,
upper case, lower case, upper rank, lower rank, upper lip, lower lip;
upper arm, lower arm; upper leg, lower leg; upper house, lower house (of
a legislature); upper layer, lower layer; Upper Paleolithic, Lower
Paleolithic (and so on for other geologic periods; upper Manhattan,
lower Manhattan (and so on for other persiods); upper Mississippi, lower
Mississippi (and so on for other rivers).

Downer, a noun, opposes upper only when upper is used as a noun for
depressing versus stimulating things, most often with reference to drugs
It is also used to refer to animals that are so sick that they cannot
stand up or otherwise need to be 'put down' (permanently). But healthy
animals are not called uppers that I know of.

tjr

Aug 28 '08 #11
On Aug 28, 11:34 am, John Machin <sjmac...@lexicon.netwrote:
On Aug 28, 11:25 am, Asun Friere <afri...@yahoo.co.ukwrote:
On Aug 28, 10:28 am, John Machin <sjmac...@lexicon.netwrote:
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???
:shrugs, Why not? One does a dir() on one's string and sees 'upper'
and 'swapcase' (but fails to see or understand 'lower'), and takes an
educated guess at what they do. In any case that was only a caveat to
the point I was trying to make, namely that you were probably being
too generous towards said poster.
Aug 28 '08 #12
Asun Friere wrote:
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.'
prior exposure to Ruby might explain this, right? (iirc, they use
"upcase" and "downcase").

</F>

Aug 28 '08 #13
Never ascribe to humour that which can be adequately explained by
increadible stupidity!
I love the irony. Don't feel bad. I recently corrected
someone's 'grammer' with a similar tone.
** Posted from http://www.teranews.com **
Aug 28 '08 #14
Tobiah wrote:
>Never ascribe to humour that which can be adequately explained by
increadible stupidity!

I love the irony.
Muphry's law.

</F>

Aug 28 '08 #15
En Thu, 28 Aug 2008 02:52:42 -0300, Fredrik Lundh <fr*****@pythonware.com>
escribi�:
Asun Friere wrote:
>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.'

prior exposure to Ruby might explain this, right? (iirc, they use
"upcase" and "downcase").
Yes. And Common Lisp has used the same very names for a longer time than
Python itself existed, so I don't agree with many comments on this thread.

--
Gabriel Genellina

Aug 30 '08 #16

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Krakatioison | last post by:
My sites navigation is like this: http://www.newsbackup.com/index.php?n=000000000040900000 , depending on the variable "n" (which is always a number), it will take me anywhere on the site......
5
by: Stu Cazzo | last post by:
I have the following: String myStringArray; String myString = "98 99 100"; I want to split up myString and put it into myStringArray. If I use this: myStringArray = myString.split(" "); it...
9
by: John F Dutcher | last post by:
I use code like the following to retrieve fields from a form: recd = recd.append(string.ljust(form.getfirst("lname",' '),15)) recd.append(string.ljust(form.getfirst("fname",' '),15)) etc.,...
9
by: Derek Hart | last post by:
I wish to execute code from a string. The string will have a function name, which will return a string: Dim a as string a = "MyFunctionName(param1, param2)" I have seen a ton of people...
10
by: Angus Leeming | last post by:
Hello, Could someone explain to me why the Standard conveners chose to typedef std::string rather than derive it from std::basic_string<char, ...>? The result of course is that it is...
37
by: Kevin C | last post by:
Quick Question: StringBuilder is obviously more efficient dealing with string concatenations than the old '+=' method... however, in dealing with relatively large string concatenations (ie,...
2
by: Andrew | last post by:
I have written two classes : a String Class based on the book " C++ in 21 days " and a GenericIpClass listed below : file GenericStringClass.h // Generic String class
2
by: s | last post by:
I'm getting compile errors on the following code: <code> #include <iostream> #include <fstream> #include <list> #include <string> using namespace std;
6
by: anush | last post by:
Hi, I am using prototype.js to save data into MySQL using Ajax.Request So i am grabbing the id and if the id<0 , I am adding it as a new data, otherwise I am just updating it. Similarly I am...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.