On Wed, May 20, 2015 at 12:54 PM, Cecil Westerhof <ce...@decebal.nl> wrote:
> Op Wednesday 20 May 2015 19:03 CEST schreef Zachary Ware:
>> try:
>> import tkinter as tk
>> from tkinter import ttk
>> except ImportError:
>> import Tkinter as tk
>> import ttk
>
> When there goes something wrong with:
>     from tkinter import ttk
> you will not understand what is happening. ;-)

If something goes wrong with the first import and raises an
ImportError, then it will execute the except clause, which will
definitely raise an ImportError. In this case the second error will
simply be chained onto the first, so the details of the first error
won't be lost.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to