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


Groups > comp.lang.python > #24401 > unrolled thread

Re: exception problem

Started byCharles Hixson <charleshixsn@earthlink.net>
First post2012-06-24 15:30 -0700
Last post2012-06-24 15:30 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: exception problem Charles Hixson <charleshixsn@earthlink.net> - 2012-06-24 15:30 -0700

#24401 — Re: exception problem

FromCharles Hixson <charleshixsn@earthlink.net>
Date2012-06-24 15:30 -0700
SubjectRe: exception problem
Message-ID<mailman.1461.1340577276.4697.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web