Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!news-transit.tcx.org.uk!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'interpreter': 0.05; 'subject:based': 0.07; 'type,': 0.07; 'typed': 0.07; 'programmer': 0.10; 'am,': 0.12; 'received:209.85.210.174': 0.13; 'received :mail-iy0-f174.google.com': 0.13; 'docs,': 0.16; 'foo.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'roy': 0.16; 'subject: \n ': 0.16; 'subject:syntax': 0.16; 'toolset': 0.16; 'mon,': 0.16; 'wrote:': 0.18; '(which': 0.19; 'dec': 0.22; 'header:In-Reply-To:1': 0.22; 'produces': 0.23; 'module': 0.26; "i'm": 0.26; 'message-id:@mail.gmail.com': 0.28; 'idle': 0.29; 'print': 0.29; 'usually': 0.31; "can't": 0.32; 'object': 0.33; 'to:addr:python-list': 0.34; 'it.': 0.34; 'things': 0.34; 'set.': 0.34; 'running': 0.35; 'subject:/': 0.35; 'example,': 0.37; 'but': 0.37; 'received:google.com': 0.37; "there's": 0.37; 'using': 0.38; 'some': 0.38; 'received:209.85': 0.38; 'finding': 0.39; "it's": 0.40; 'received:209': 0.40; 'to:addr:python.org': 0.40; '2011': 0.61; 'day,': 0.64; 'fan': 0.66; '19,': 0.68; 'want,': 0.71; 'experiment': 0.84; 'fired': 0.91; 'snap': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=5V2zGsFwBNSlUu3YKxzm3omD30etE/xH0cOcxmtBd0A=; b=cRUTSWTgWV5jEs10vnpQ8kCBcSEbQZXg1dT8eYU9CY8UOZs27fdQARgTR3tVB/0lNM XYUy1BFNKxcbYrlkTQFnNUY+nWAe7BSznKVdxOGQmhzmfsiftWc6j5DwyDDB4OwFYFX0 0d3QKVCv6Zdafu6z2DpRDx+dyJgnR87WYr6/g= MIME-Version: 1.0 In-Reply-To: References: <841f4d29-f50b-4b0b-912b-b497fb6e60ec@t16g2000vba.googlegroups.com> <15424060.724.1324183952802.JavaMail.geo-discussion-forums@prix23> <4eed96c9$0$29979$c3e8da3$5496439d@news.astraweb.com> Date: Mon, 19 Dec 2011 01:06:34 +1100 Subject: Re: Pythonification of the asterisk-based collection packing/unpacking syntax From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1324217197 news.xs4all.nl 6905 [2001:888:2000:d::a6]:46518 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:17457 On Mon, Dec 19, 2011 at 12:58 AM, Roy Smith wrote: > In addition to print and type, I'm a big fan of dir(). =A0Often, I know a= n > object has a method to do what I want, but I can't remember the name. > For example, the other day, I was using a set (which I don't use very > often). =A0I needed the method to remove an item from the set. =A0Faster > than finding the right place in the docs, I just fired up an interpreter > and typed dir(set()) at it. That's excellent when all you need is the name. I usually have IDLE running (all the time - which sometimes produces oddities after I experiment with monkey-patching some module or other, and then oddly enough, things don't work properly!!), and will snap off "help(foo)" for any foo. Unfortunately help() is at times unhelpful, and even at its best it's very spammy. There's no one best solution; the successful programmer will usually have a large toolset at his disposal. ChrisA