Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1.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.058 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.01; 'python.': 0.02; 'declared': 0.16; 'helps.': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:t-ipconnect.de': 0.16; 'sockets': 0.16; 'subject:array': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'all,': 0.19; 'trying': 0.19; 'subject:/': 0.26; 'header:In-Reply-To:1': 0.27; 'array': 0.29; 'subject:list': 0.30; "skip:' 10": 0.31; 'add': 0.35; 'charset:us-ascii': 0.36; 'hi,': 0.36; 'list.': 0.37; 'follows:': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'hope': 0.61; 'new': 0.61; 'kind': 0.63; 'received:109': 0.72; '(pdt)': 0.91; 'received:(helo localhost)': 0.91; '2013': 0.98 Date: Sat, 26 Oct 2013 23:59:26 +0200 From: Johannes Findeisen To: python-list@python.org Subject: Re: array/list of sockets In-Reply-To: References: X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.22; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sun, 27 Oct 2013 00:06:50 +0200 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1382825212 news.xs4all.nl 15912 [2001:888:2000:d::a6]:51785 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:57672 Hi, On Sat, 26 Oct 2013 14:41:15 -0700 (PDT) theelder777@ wrote: > Hello all, I am kind of new to python. I am currently trying to make and use a list/array of sockets in a program. So I have declared an array as follows: > myCSocks = ['CSock1', 'CSock2', 'CSock3', 'CSock4', 'CSock5'] You actually have added strings to your list. this 'is_a_string. You need to add the objcts to the list. E.g.: myCSocks = [CSock1, CSock2, CSock3, CSock4, CSock5] Hope this helps. Regards, Johannes