Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #12820
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeder.news-service.com!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.030 |
| X-Spam-Evidence | '*H*': 0.94; '*S*': 0.00; 'string.': 0.04; 'function,': 0.07; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'helps!': 0.16; 'open()': 0.16; 'received:209.85.210.174': 0.18; 'received:mail- iy0-f174.google.com': 0.18; 'trying': 0.21; 'header:In-Reply- To:1': 0.22; 'assigning': 0.23; 'loop,': 0.23; 'skip:( 30': 0.24; 'message-id:@mail.gmail.com': 0.29; 'second': 0.29; '\xc2\xa0\xc2\xa0\xc2\xa0': 0.30; 'usual': 0.31; 'error': 0.32; 'to:addr:python-list': 0.33; 'calling': 0.33; 'file': 0.36; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.39; 'to:addr:python.org': 0.39; 'your': 0.61; 'hope': 0.61; 'you.': 0.62; 'subject:thing': 0.84; 'subject::': 0.87 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=KdBRT2aD7g4CfaWP5Nk1U6oQvsEI+n05su8J0RJPOvI=; b=wi12zjKLXc0ZW1n06NIMx/4SBCZNIROJTU3rUW0PveWR2DgF/mR6BiFnAT2ZhSyZ5J +1RQpPTvqTdLBi0FdI5HhN9ES0w7DwakPrDoviw5krK9tjnFrNrZSU01SdEWMcfY5WPi Yms8X3zp/5ixqMX0olcnX4ukGdhDnzFHbjlKY= |
| MIME-Version | 1.0 |
| In-Reply-To | <tencent_05A7597541D14E995173354F@qq.com> |
| References | <tencent_05A7597541D14E995173354F@qq.com> |
| Date | Tue, 6 Sep 2011 18:22:37 +1000 |
| Subject | Re: strang thing: |
| From | Chris Angelico <rosuav@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.794.1315297360.27778.python-list@python.org> (permalink) |
| Lines | 14 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1315297360 news.xs4all.nl 2444 [2001:888:2000:d::a6]:53059 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:12820 |
Show key headers only | View raw
2011/9/6 守株待兔 <1248283536@qq.com>: > file = open(filename,'r') > when i add (date,open,high,low,close,vol,adjclose) = (row[0], row[1], You're assigning to the name "open", which is shadowing the built-in of the same name. The second time through the loop, you're not calling the usual open() function, you're trying to call your string. That's what your error is telling you. Hope that helps! ChrisA
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: strang thing: Chris Angelico <rosuav@gmail.com> - 2011-09-06 18:22 +1000
Re: strange thing: "W. eWatson" <wolftracks@invalid.com> - 2011-09-06 19:43 -0700
Re: strange thing: Chris Angelico <rosuav@gmail.com> - 2011-09-07 12:48 +1000
Re: strange thing: "W. eWatson" <wolftracks@invalid.com> - 2011-09-06 22:08 -0700
csiph-web