A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-August/046859.html below:

[Python-Dev] Python in Unicode context

[Python-Dev] Python in Unicode contextMichael Hudson mwh at python.net
Thu Aug 5 13:18:18 CEST 2004
"M.-A. Lemburg" <mal at egenix.com> writes:

> To me ...
>
> try:
>      ...
> except Exception, errobj:
>      # catches all exceptions
>      pass
>
> ... is the most natural way of using that single root (and it already
> works great today).

Well, uh, it's not totally bullet proof:

>>> class C: pass
... 
[24618 refs]
>>> try: raise C
... except Exception, err: print err
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
__main__.C: <__main__.C instance at 0x403a7814>
[24654 refs]
>>> 

but I this really doesn't seem to happen in the wild.

(I have a hacky patch which makes exceptions new-style which I'll post
in a moment).

Cheers,
mwh

-- 
  Lisp nearing the age of 50 is the most modern language out
  there. GC, dynamic, reflective, the best OO model extant including
  GFs, procedural macros, and the only thing old-fashioned about it 
  is that it is compiled and fast.   -- Kenny Tilton, comp.lang.python
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4