Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.xlned.com!newsfeed.xs4all.nl!newsfeed4.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; 'insert': 0.05; 'interpreter': 0.05; 'assign': 0.07; 'indicated': 0.07; '[0,': 0.09; 'cc:addr:python-list': 0.11; 'inserting': 0.16; 'list)': 0.16; 'subject:questions': 0.16; 'subject:simple': 0.16; '>>>': 0.22; 'email addr:gmail.com>': 0.22; 'handles': 0.22; 'cc:addr:python.org': 0.22; '>>>': 0.24; '(by': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'second': 0.26; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'lists': 0.32; 'url:python': 0.33; 'created': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'url:listinfo': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'list': 0.37; 'list.': 0.37; 'skip:[ 10': 0.38; 'url:mail': 0.40; 'to:addr:gmail.com': 0.65; 'subject:Hello': 0.72; 'subject:! ': 0.74; 'florian': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=TISh8GG31fBqYbe97fpNHXTd/1hW5EHLOCq64AH310c=; b=zi8ycPY7v36LNlp7/dHb17Qy37MgvTO9YbClsDgHMwAdUn54xlJtX357te+pDSaDd0 1XmRnSk4+d8EN37nG7XA88RAyP2tQQWuA9tN3MDwWMAU+WO8eABqQ2gwxtp8PL4LDrC2 PGAmBhQDHxdnhrPkehGwb9U0nxF59QRDQT0cAXtu5oxFmg8jihChi7szVqaAJZ5p7cT2 xBCzosj+XBtwEqovzN9IyDXu/iIslS7oHNbr71/uNnBkkE/PIPM2cIDVUmYt2s8T42uk P3dKs2P6LfKBfrSsgvoisG9jtq8sFdtof6J5GxILwCygbATKHSEr3LTr1ZqzhKcZzCzI RI6g== MIME-Version: 1.0 X-Received: by 10.194.93.74 with SMTP id cs10mr34214919wjb.9.1374819565432; Thu, 25 Jul 2013 23:19:25 -0700 (PDT) In-Reply-To: References: Date: Fri, 26 Jul 2013 14:19:25 +0800 Subject: Re: Hello Everyone! A simple questions! From: Thanatos xiao To: Florian Baumgartner Content-Type: multipart/alternative; boundary=047d7bf0c86cd3f70d04e2641f35 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 77 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1374819573 news.xs4all.nl 15967 [2001:888:2000:d::a6]:49337 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51287 --047d7bf0c86cd3f70d04e2641f35 Content-Type: text/plain; charset=ISO-8859-1 Thanks I just surprised by three dot 2013/7/26 Florian Baumgartner > As alex23 already indicated you created a recursive data-structure (by > inserting a reference to the list into the second place of the list) and > the interpreter handles this gracefully by showing [...]. > > In case you really want to insert the lists members into the second place > you can assign a copy of the list. > > values = [0,1,2] > values[1] = values[:] > > > > > > 2013/7/26 Thanatos xiao > >> >>> values = [0, 1, 2]>>> values[1] = values>>> values[0, [...], 2] >> >> why?? >> >> >> -- >> http://mail.python.org/mailman/listinfo/python-list >> >> > --047d7bf0c86cd3f70d04e2641f35 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks
I just surprised by three dot


2013/7/26= Florian Baumgartner <bfloriang@gmail.com>
As alex23 already indicated= you created a recursive data-structure (by inserting a reference to the li= st into the second place of the list) and the interpreter handles this grac= efully by showing [...].

In case you really want to insert the lists members into the sec= ond place you can assign a copy of the list.

value= s =3D [0,1,2]
values[1] =3D values[:]


=A0

2013/7/26 Thanatos xiao &= lt;yanxiaopei1= 99@gmail.com>
>>> values =3D [0, 1, 2= ] >>> values[1] =3D values >>> values [0, [...], 2]

why??

--
http://mail.python.org/mailman/listinfo/python-list



--047d7bf0c86cd3f70d04e2641f35--