Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #24400
| Path | csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.001 |
| 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; 'def': 0.11; 'chunks': 0.16; 'code?': 0.16; 'line)': 0.16; 'message-id:@earthlink.net': 0.16; 'received:dsl.mindspring.com': 0.16; 'str)': 0.16; 'subject:exception': 0.16; 'subject:problem': 0.22; '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; 'received:66': 0.38; 'end': 0.38; 'to:addr:python.org': 0.39; 'finally': 0.67; '3...': 0.84 |
| Date | Sun, 24 Jun 2012 15:26:59 -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 | exception problem |
| 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.1460.1340576896.4697.python-list@python.org> (permalink) |
| Lines | 31 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1340576896 news.xs4all.nl 6935 [2001:888:2000:d::a6]:59278 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:24400 |
Show key headers only | View raw
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
exception problem Charles Hixson <charleshixsn@earthlink.net> - 2012-06-24 15:26 -0700
csiph-web