Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #5025

Re: Inconsistency with split() - Script, OS, or Package Problem?

Path csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!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 <ethan@stoneleaf.us>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; '%s"': 0.09; '>>>>': 0.09; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'received:gator410.hostgator.com': 0.09; 'subject:Problem': 0.09; '~ethan~': 0.09; 'pm,': 0.11; '>>>': 0.12; 'wrote:': 0.14; 'furman': 0.16; 'received:72.11': 0.16; 'received:72.11.125': 0.16; 'received:72.11.125.166': 0.16; 'subject:split': 0.16; 'appear': 0.19; 'cc:no real name:2**0': 0.20; 'cc:2**0': 0.20; 'header:In-Reply-To:1': 0.22; 'cc:addr:python-list': 0.22; 'help,': 0.22; 'mon,': 0.22; '(and': 0.22; 'somebody': 0.25; 'changing': 0.29; 'string': 0.29; 'problem': 0.29; 'subject:?': 0.29; 'probably': 0.30; 'cc:addr:python.org': 0.31; 'key.': 0.31; 'does': 0.31; 'created': 0.33; 'change': 0.34; 'file': 0.35; 'that,': 0.35; 'print': 0.35; 'header:User-Agent:1': 0.35; 'test.': 0.35; 'wright': 0.35; 'getting': 0.36; 'else': 0.37; 'some': 0.37; 'subject:with': 0.37; 'run': 0.37; 'where': 0.39; 'how': 0.39; 'empty': 0.40; "it's": 0.40; 'header:Received:5': 0.40; 'might': 0.40; 'note:': 0.61; '2011': 0.62; 'received:hostgator.com': 0.64; 'show': 0.67; 'received:websitewelcome.com': 0.71; 'subject:Package': 0.84; 'from.': 0.93
Date Mon, 09 May 2011 13:44:43 -0700
From Ethan Furman <ethan@stoneleaf.us>
User-Agent Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version 1.0
To James Wright <jamfwright@gmail.com>
Subject Re: Inconsistency with split() - Script, OS, or Package Problem?
References <BANLkTi=g2h_BxZDdTdLqyB3nZCukD+Dupw@mail.gmail.com> <4DC838CD.7030404@stoneleaf.us> <BANLkTimuEQMsjyPyW2XUzpQeU8chNPeyGg@mail.gmail.com> <4DC84223.3000502@stoneleaf.us> <BANLkTinCBHbQoJ89OGawt9r02VQvCTeSqw@mail.gmail.com> <4DC848B7.6010804@stoneleaf.us> <BANLkTikX1q_CqB6Ss-4edckiwiA+nOGrYQ@mail.gmail.com>
In-Reply-To <BANLkTikX1q_CqB6Ss-4edckiwiA+nOGrYQ@mail.gmail.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-AntiAbuse This header was added to track abuse, please include it with any abuse report
X-AntiAbuse Primary Hostname - gator410.hostgator.com
X-AntiAbuse Original Domain - python.org
X-AntiAbuse Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse Sender Address Domain - stoneleaf.us
X-Source
X-Source-Args
X-Source-Dir
Cc python-list@python.org
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.1356.1304973470.9059.python-list@python.org> (permalink)
Lines 33
NNTP-Posting-Host 82.94.164.166
X-Trace 1304973470 news.xs4all.nl 41110 [::ffff:82.94.164.166]:60951
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:5025

Show key headers only | View raw


James Wright wrote:
> On Mon, May 9, 2011 at 4:04 PM, Ethan Furman wrote:
>> James Wright wrote:
>>> On Mon, May 9, 2011 at 3:36 PM, Ethan Furman wrote:
 >>>>
>>>> Change your print line to:
>>>>
>>>>   print("D4[%s] = %s" % (report, each_value))
>>>>
>>>> After that, you'll have to track down how D4 is being created to see
>>>> where 'vsr' is coming from.
 >>>
>>> It does not appear to show a key:
>>>
>>> D4[] = vsr
 >>
>> Huh -- probably the empty string ('') -- to verify that (and know for sure
>> -- always good when debugging! ;)  change the both %s to %r and run again;
>>  then you'll have to track down where D4 is being created to see why it's
>> getting that weird key.
> 
> A quick note: Renaming the file allowed it to run successfully one
> time.  Then it failed per usual.  Renaming it again did not help, so
> that is not a repeatable test.
> 
> Changing %s to %r:
> 
> D4[''] = vsr

When you find the problem let us know -- might save somebody else some 
grief.  :)

~Ethan~

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Inconsistency with split() - Script, OS, or Package Problem? Ethan Furman <ethan@stoneleaf.us> - 2011-05-09 13:44 -0700

csiph-web