Re: Identifying exceptions
Guido.van.Rossum@cwi.nl
Tue, 07 Mar 1995 17:46:37 +0100
> > Are there other, better solutions?
> D) If you really can't stand using module identifiers all the time
>
> import socket
> import struct
> from socket import *
> from struct import *
>
> Now you can use either unqualified or qualified names, as you see fit.
Oops! the socket module defines a function 'socket', so the statement
"from socket import *" redefines the name socket, and "socket.error"
won't work :-(
--Guido van Rossum, CWI, Amsterdam <mailto:Guido.van.Rossum@cwi.nl>
<http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>