Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #75049
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| 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; 'subject:not': 0.03; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:Why': 0.09; '23,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'example': 0.22; 'import': 0.22; 'header:User-Agent:1': 0.23; 'received:comcast.net': 0.24; 'specify': 0.24; 'this:': 0.26; 'post': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply- To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'lines': 0.31; 'probably': 0.32; 'board': 0.35; 'done.': 0.35; 'but': 0.35; 'module.': 0.36; "didn't": 0.36; 'subject:?': 0.36; 'to:addr :python-list': 0.38; 'pm,': 0.38; 'anything': 0.39; 'to:addr:python.org': 0.39; 'skip:p 20': 0.39; 'received:org': 0.40; "you're": 0.61; 'website:': 0.67; 'jul': 0.74 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Ned Batchelder <ned@nedbatchelder.com> |
| Subject | Re: Why does not pprint work? |
| Date | Tue, 22 Jul 2014 22:26:55 -0400 |
| References | <6e09bc9c-d510-4076-b20d-32df796ca59e@googlegroups.com> <CAPTjJmq6_0JL8k0Pyr2Xd8J6S_T2D6KK5ft75s9KOpGmkSrD0A@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | c-50-133-228-126.hsd1.ma.comcast.net |
| User-Agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
| In-Reply-To | <CAPTjJmq6_0JL8k0Pyr2Xd8J6S_T2D6KK5ft75s9KOpGmkSrD0A@mail.gmail.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.12211.1406082429.18130.python-list@python.org> (permalink) |
| Lines | 29 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1406082429 news.xs4all.nl 2931 [2001:888:2000:d::a6]:36623 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:75049 |
Show key headers only | View raw
On 7/22/14 5:49 PM, Chris Angelico wrote: > On Wed, Jul 23, 2014 at 7:42 AM, fl <rxjwg98@gmail.com> wrote: >> I enter the example lines of that website: >> >> >> import pprint >> board = [ [0]*8 ] * 8 >> pprint(board) > > Flaw in the blog post: he didn't actually specify the import line. > What you actually want is this: > > from pprint import pprint > > Or use pprint.pprint(board), but you probably don't need anything else > from the module. > > Ned, if you're reading this: Adding the import would make the post clearer. :) Done. > > ChrisA > -- Ned Batchelder, http://nedbatchelder.com
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Why does not pprint work? fl <rxjwg98@gmail.com> - 2014-07-22 14:42 -0700
Re: Why does not pprint work? Chris Angelico <rosuav@gmail.com> - 2014-07-23 07:49 +1000
Re: Why does not pprint work? emile <emile@fenx.com> - 2014-07-22 14:51 -0700
Re: Why does not pprint work? fl <rxjwg98@gmail.com> - 2014-07-22 15:05 -0700
Re: Why does not pprint work? emile <emile@fenx.com> - 2014-07-22 15:17 -0700
Re: Why does not pprint work? Chris Angelico <rosuav@gmail.com> - 2014-07-23 08:19 +1000
Re: Why does not pprint work? Chris Kaynor <ckaynor@zindagigames.com> - 2014-07-22 15:22 -0700
Re: Why does not pprint work? Ned Batchelder <ned@nedbatchelder.com> - 2014-07-22 22:26 -0400
Re: Why does not pprint work? Chris Angelico <rosuav@gmail.com> - 2014-07-23 15:05 +1000
Re: Why does not pprint work? robkotenko@gmail.com - 2014-08-03 14:34 -0700
Re: Why does not pprint work? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-03 23:49 +0100
csiph-web