Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #24401
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeder2.ecngs.de!ecngs!feeder.ecngs.de!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <charleshixsn@earthlink.net> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'exception': 0.05; 'finally:': 0.07; 'none:': 0.07; '(self,': 0.09; 'except:': 0.09; 'try:': 0.09; 'python': 0.10; 'def': 0.11; 'chunks': 0.16; 'code?': 0.16; 'line)': 0.16; 'message-id:@earthlink.net': 0.16; 'python3': 0.16; 'received:dsl.mindspring.com': 0.16; 'str)': 0.16; 'subject:exception': 0.16; 'wrote:': 0.17; 'sorry,': 0.22; 'subject:problem': 0.22; 'header:In-Reply-To:1': 0.23; 'print': 0.25; 'header:User-Agent:1': 0.26; 'assert': 0.29; 'produces': 0.29; 'code:': 0.29; 'skip:( 20': 0.30; 'to:addr:python-list': 0.35; 'subject:: ': 0.37; 'received:66': 0.38; 'pm,': 0.38; 'end': 0.38; 'to:addr:python.org': 0.39; 'finally': 0.67; '3...': 0.84 |
| Date | Sun, 24 Jun 2012 15:30:09 -0700 |
| From | Charles Hixson <charleshixsn@earthlink.net> |
| User-Agent | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20120506 Icedove/3.0.11 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: exception problem |
| References | <4FE79433.8020704@earthlink.net> |
| In-Reply-To | <4FE79433.8020704@earthlink.net> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| 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.1461.1340577276.4697.python-list@python.org> (permalink) |
| Lines | 38 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1340577276 news.xs4all.nl 6961 [2001:888:2000:d::a6]:33976 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:24401 |
Show key headers only | View raw
Sorry, I left out:
er$ python3 --version
Python 3.2.3rc1
On 06/24/2012 03:26 PM, Charles Hixson wrote:
> The code:
> print ("pre-chunkLine")
> chunks = []
> try:
> chunks = self.chunkLine (l)
> except:
> print ("caught exception")
> print (sys.exc_info()[:2])
> finally:
> print ("at finally")
> print ("chunks =")
> print (repr(chunks), ".", end = ":")
> produces this result:
> . . ., by
> pre-chunkLine
> caught exception
> at finally
> path 3...
>
> Any suggestions as to what's wrong with the code?
> FWIW, chunkLine begins:
> def chunkLine (self, line):
> print ("chunkLine: ")
> print ("line = ", line)
> if line == None:
> return []
> assert (isinstance (line, str) )
>
--
Charles Hixson
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: exception problem Charles Hixson <charleshixsn@earthlink.net> - 2012-06-24 15:30 -0700
csiph-web