Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!xlned.com!feeder7.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.199 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.61; '*S*': 0.01; 'python': 0.08; 'wrote:': 0.15; 'giant': 0.16; 'rantingrick': 0.16; 'received:192.168.1.40': 0.16; 'repr()': 0.16; 'stdout': 0.16; 'very,': 0.16; 'url:blog': 0.16; 'header:In-Reply-To:1': 0.22; 'shell': 0.29; 'object': 0.30; 'module': 0.30; "they'll": 0.30; 'url:library': 0.31; 'to:addr :python-list': 0.34; 'header:User-Agent:1': 0.34; 'url:python': 0.37; 'enhanced': 0.37; 'some': 0.37; 'received:192': 0.38; 'url:org': 0.38; 'user': 0.38; 'subject:: ': 0.38; 'something': 0.38; 'think': 0.38; 'two': 0.38; 'received:192.168.1': 0.39; 'url:docs': 0.39; 'to:addr:python.org': 0.39; 'might': 0.39; 'skip:- 50': 0.40; 'did': 0.40; 'kind': 0.60; 'ever': 0.65; 'received:62': 0.67; 'subject:!': 0.67; 'subject:The': 0.73; '(word': 0.84; 'from:addr:t': 0.84; 'structures.': 0.84; 'url:functions': 0.84; 'pro': 0.89; 'url:archives': 0.91 Date: Wed, 27 Jul 2011 02:39:53 +0200 From: Thomas Jollans User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110628 Thunderbird/5.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: @PyNoobs: The Fundamental Five Built-in Functions, and Beyond! References: In-Reply-To: X-Enigmail-Version: 1.2 OpenPGP: id=5C8691ED Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1311727186 news.xs4all.nl 23838 [2001:888:2000:d::a6]:42049 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:10358 Beyond! On 27/07/11 02:01, rantingrick wrote: > -------------------------------------------------- > 1. help() > -------------------------------------------------- > -------------------------------------------------- > 2. dir() > -------------------------------------------------- Pro tip: the "IPython" enhanced Python shell makes these two even more amicable. > -------------------------------------------------- > 3. repr() > -------------------------------------------------- > http://docs.python.org/py3k/library/functions.html#repr > > Most new user think that printing an object to stdout is all they'll > ever need. Also handy: the "pprint" stdlib module to pretty-print complex structures. http://docs.python.org/py3k/library/pprint.html > -------------------------------------------------- > 5. id() > -------------------------------------------------- This reminds me of something I did last year. Some of you might recall. http://blog.jollybox.de/archives/62-python-swap (Word of warning: bad idea. Very, very bad idea. Still, potentially amusing. Kind of like blowing up a giant hydrogen-filled baloon.)