2.2 features
Aahz Maruch
aahz at panix.com
Mon Aug 6 00:59:53 EDT 2001
In article <mailman.996866288.23363.python-list at python.org>,
Tim Peters <tim.one at home.com> wrote:
>
>Combine it with some backward-compatibility hacks, and you can do
>some, umm, "interesting" things with this:
>
>>>> def stringin(s, stuple):
>... try:
>... raise s
>... except stuple:
>... return 1
>... else:
>... return 0
>...
>>>> stringin('b', ('a', ('c', 'b'), 'd'))
>1
>>>> stringin('b', ('a', ('c', 'e'), 'd'))
>Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "<stdin>", line 3, in stringin
>b
Have I told you lately that you are a sick and twisted individual?
--
--- Aahz <*> (Copyright 2001 by aahz at pobox.com)
Hugs and backrubs -- I break Rule 6 http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het Pythonista
"activist for accuracy" --SJM
More information about the Python-list
mailing list