On 06/04/12 07:10, Khalid Al-Ghamdi wrote:

I'm reading this book that says when creating a socket you have to use
the socket.socket() _function _as in :
...
 >>> type(ss)
<class 'socket.socket'>

so, which is it? or do authors loosely use these terms interchangeably
in this context?

It just looks like sloppy terminology to me.

>>> import socket as s
>>> s.socket
<class 'socket._socketobject'>
>>> s.gethostbyname
<built-in function gethostbyname>

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to