Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #53993
| From | "Prasad, Ramit" <ramit.prasad@jpmorgan.com.dmarc.invalid> |
|---|---|
| Subject | RE: Help please, why doesn't it show the next input? |
| Date | 2013-09-11 19:58 +0000 |
| References | <ef8de6db-5f35-4d07-8306-bcec47b1e69b@googlegroups.com> <l0ou1r$c1n$1@reader1.panix.com> <2dba1d63-16f0-412d-b650-0cdc27c3b57e@googlegroups.com> <mailman.242.1378900277.5461.python-list@python.org> <b4c3b51d-8e10-4fff-8b36-a34dd5cc9af4@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.265.1378932066.5461.python-list@python.org> (permalink) |
William Bryant wrote:
> Sent: Wednesday, September 11, 2013 2:32 PM
> To: python-list@python.org
> Subject: Re: Help please, why doesn't it show the next input?
>
> @Dave Angel
>
> What is .lower() ?
Thanks for bottom posting and trimming, but you should
leave some content quoted for context. Otherwise
people will not what you are referring to.
You can find answers to questions like this in the API.
http://docs.python.org/2/library/stdtypes.html#str.lower
I would recommend taking time to get familiar with the
Athena interpreter. It can also answer questions like
this (but with less detail than the web API).
You can use dir() to find the attributes on any object.
help() will give you docstring for the attribute/class.
>>> 'A'.lower()
'a'
>>> help(''.lower)
Help on built-in function lower:
lower(...)
S.lower() -> string
Return a copy of the string S converted to lowercase.
>>> help(dir)
Help on built-in function dir in module __builtin__:
dir(...)
dir([object]) -> list of strings
If called without an argument, return the names in the current scope.
Else, return an alphabetized list of names comprising (some of) the attributes
of the given object, and of attributes reachable from it.
If the object supplies a method named __dir__, it will be used; otherwise
the default dir() logic is used and returns:
for a module object: the module's attributes.
for a class object: its attributes, and recursively the attributes
of its bases.
for any other object: its attributes, its class's attributes, and
recursively the attributes of its class's base classes.
>>> dir('')
['__add__', '__class__', '__contains__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem_\
_', '__getnewargs__', '__getslice__', '__gt__', '__hash__', '__init__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__\
', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclass\
hook__', '_formatter_field_name_split', '_formatter_parser', 'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expan\
dtabs', 'find', 'format', 'index', 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lo\
wer', 'lstrip', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'starts\
with', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']
If you want to see all the relevant information you can use help()
on the class [e.g. help(str)]. I think help(class) will not show
functions that start with _ unless they are python magic dunder
functions (e.g. __str__).
~Ramit
This email is confidential and subject to important disclaimers and conditions including on offers for the purchase or sale of securities, accuracy and completeness of information, viruses, confidentiality, legal privilege, and legal entity disclaimers, available at http://www.jpmorgan.com/pages/disclosures/email.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Help please, why doesn't it show the next input? William Bryant <gogobebe2@gmail.com> - 2013-09-10 21:49 -0700
Re: Help please, why doesn't it show the next input? John Gordon <gordon@panix.com> - 2013-09-11 05:11 +0000
Re: Help please, why doesn't it show the next input? William Bryant <gogobebe2@gmail.com> - 2013-09-10 22:39 -0700
Re: Help please, why doesn't it show the next input? Jugurtha Hadjar <jugurtha.hadjar@gmail.com> - 2013-09-11 10:32 +0100
Re: Help please, why doesn't it show the next input? William Bryant <gogobebe2@gmail.com> - 2013-09-11 12:33 -0700
Re: Help please, why doesn't it show the next input? John Gordon <gordon@panix.com> - 2013-09-11 19:46 +0000
Re: Help please, why doesn't it show the next input? Jugurtha Hadjar <jugurtha.hadjar@gmail.com> - 2013-09-12 02:14 +0100
Re: Help please, why doesn't it show the next input? Jugurtha Hadjar <jugurtha.hadjar@gmail.com> - 2013-09-12 02:08 +0100
Re: Help please, why doesn't it show the next input? Dave Angel <davea@davea.name> - 2013-09-11 11:50 +0000
Re: Help please, why doesn't it show the next input? William Bryant <gogobebe2@gmail.com> - 2013-09-11 12:31 -0700
Re: Help please, why doesn't it show the next input? Dave Angel <davea@davea.name> - 2013-09-11 20:32 +0000
RE: Help please, why doesn't it show the next input? "Prasad, Ramit" <ramit.prasad@jpmorgan.com.dmarc.invalid> - 2013-09-11 19:58 +0000
Re: Help please, why doesn't it show the next input? Terry Reedy <tjreedy@udel.edu> - 2013-09-11 17:14 -0400
Re: Help please, why doesn't it show the next input? William Bryant <gogobebe2@gmail.com> - 2013-09-11 23:04 -0700
Re: Help please, why doesn't it show the next input? Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-09-12 10:39 +0100
Re: Help please, why doesn't it show the next input? William Bryant <gogobebe2@gmail.com> - 2013-09-13 15:12 -0700
Re: Help please, why doesn't it show the next input? John Gordon <gordon@panix.com> - 2013-09-13 22:41 +0000
Re: Help please, why doesn't it show the next input? MRAB <python@mrabarnett.plus.com> - 2013-09-13 23:48 +0100
Re: Help please, why doesn't it show the next input? William Bryant <gogobebe2@gmail.com> - 2013-09-13 16:34 -0700
csiph-web