🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.python
Article #28247

Re: Pytania początkującego cz. 1

#28247
From: Jordan Szubert
Date: Thu, 10 Nov 2011 15:25
32 lines
1727 bytes
Dnia 10-11-2011 o 14:41:11 hubert depesz lubaczewski <depesz@depesz.com>  
napisał(a):

> On 2011-11-09, Jordan Szubert <usenet@joru.us.to> wrote:
>>  from pprint import pprint
>> dowolnie skomplikowane to może nie, ale lista dictów tupli -- czemu nie
>
> chyba robię coś źle:
>
>>>> from pprint import pprint
>>>> z=[1,2,3]
>>>> x={"a":123,"b":12,"c":(5,6,7)}
>>>> q=(z, x)
>>>> print q
> ([1, 2, 3], {'a': 123, 'c': (5, 6, 7), 'b': 12})
>>>> pprint(q)
> ([1, 2, 3], {'a': 123, 'b': 12, 'c': (5, 6, 7)})
>
> nie za bardzo widzę różnicę.

o fakt, domyślnie stara się wpakować w jedna linijkę, jak się nie uda to  
wcina dopiero

>>> pprint({1:2,3:4})
{1: 2, 3: 4}
>>> pprint({1:2,3:4},width=1)
{1: 2,
  3: 4}
>>>

-- 
Jordan Szubert
Technical Details
Message-ID: <op.v4qk4jprhilul8@asus7p.home>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!newsreader4.netcologne.de!news.netcologne.de!nx01.iad01.newshosting.com!newshosting.com!newsfeed.neostrada.pl!unt-exc-02.news.neostrada.pl!unt-spo-b-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
References: <vhsqo8-di8.ln1@depesz.com> <op.v4ozxmshhilul8@asus7p.home> <ns0to8-r2o.ln1@depesz.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!newsreader4.netcologne.de!news.netcologne.de!nx01.iad01.newshosting.com!newshosting.com!newsfeed.neostrada.pl!unt-exc-02.news.neostrada.pl!unt-spo-b-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
Newsgroups: pl.comp.lang.python
Subject: Re: Pytania początkującego cz. 1
References: <vhsqo8-di8.ln1@depesz.com> <op.v4ozxmshhilul8@asus7p.home> <ns0to8-r2o.ln1@depesz.com>
Date: Thu, 10 Nov 2011 16:25:21 +0100
MIME-Version: 1.0
From: "Jordan Szubert" <usenet@joru.us.to>
Organization: HELL inc.
Message-ID: <op.v4qk4jprhilul8@asus7p.home>
User-Agent: Opera Mail/11.52 (Win32)
Lines: 38
NNTP-Posting-Host: 83.26.212.28
X-Trace: 1320938723 unt-rea-a-02.news.neostrada.pl 5816 83.26.212.28:58703
X-Complaints-To: abuse@news.neostrada.pl
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit