[pypy-dev] Socket Module

Frank Wang frankw at mit.edu
Tue Apr 18 16:14:51 EDT 2017


Hi,

I want to modify the definition of socket.socket() to include an extra
parameter. I found this function (newsocket):

https://bitbucket.org/pypy/pypy/src/8175c5e20480b2c8e1b95c7f758458db7193f1a8/pypy/module/_socket/interp_socket.py?at=default&fileviewer=file-view-default#interp_socket.py-613

Is this the right function to modify? Since W_Socket inherits from W_Root,
in the socket call, I want to call a function in W_Root. Should I call it
on the space.wrap(self) object or just self? My question is more around
that "self" seems to be a wrapped interpreter object already, specifically
W_Socket. Why does it need to wrapped again? Unless I'm confused....

Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20170418/e9883f77/attachment.html>


More information about the pypy-dev mailing list