🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Pytania początkującego cz. 1

#28262
From: Adam Przybyla
Date: Thu, 10 Nov 2011 15:57
35 lines
2215 bytes
hubert depesz lubaczewski <depesz@depesz.com> wrote:
> 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ę.
	... czasami bywa roznica:
>>> pprint.pprint([10**20]*10)
[100000000000000000000L,
 100000000000000000000L,
 100000000000000000000L,
 100000000000000000000L,
 100000000000000000000L,
 100000000000000000000L,
 100000000000000000000L,
 100000000000000000000L,
 100000000000000000000L,
 100000000000000000000L]
>>> ([10**20]*10)
[100000000000000000000L, 100000000000000000000L, 100000000000000000000L, 100000000000000000000L, 100000000000000000000L, 100000000000000000000L, 100000000000000000000L, 100000000000000000000L, 100000000000000000000L, 100000000000000000000L]
>>> 

Z powazaniem
								Adam Przybyla
Technical Details
Message-ID: <j9gs97$mkt$1@polsl.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!polsl.pl!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!agh.edu.pl!news.agh.edu.pl!polsl.pl!not-for-mail
From: Adam Przybyla <adam@rybnik.pl>
Newsgroups: pl.comp.lang.python
Subject: Re: Pytania początkującego cz. 1
Date: Thu, 10 Nov 2011 15:57:27 +0000 (UTC)
Organization: Politechnika Slaska, Gliwice
Lines: 35
Sender: Adam Przybyla <adam@smtp.ertel.com.pl>
Message-ID: <j9gs97$mkt$1@polsl.pl>
References: <vhsqo8-di8.ln1@depesz.com> <op.v4ozxmshhilul8@asus7p.home> <ns0to8-r2o.ln1@depesz.com>
NNTP-Posting-Host: smtp.ertel.com.pl
Mime-Version: 1.0
X-Trace: polsl.pl 1320940647 23197 62.182.231.178 (10 Nov 2011 15:57:27 GMT)
X-Complaints-To: news@polsl.pl
NNTP-Posting-Date: Thu, 10 Nov 2011 15:57:27 +0000 (UTC)
User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/2.6.18-194.8.1.el5xen (i686))
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit