Antoine Pitrou added the comment:

> Perhaps it is time to add support of ipaddress objects in socket functions.

What I was thinking too :-)
However, beware the parsing cost of ipaddress objects themselves.

One common pattern when doing UDP networking is the following:

  def datagram_received(self, remote_addr, data):
      # process data
      ...
      self.send_to(remote_addr, response_data)

If you want to pass an ipaddress object to send_to, you have to make it so that 
datagram_received() gives you an ipaddress object too.

Perhaps we need a more low-level solution, e.g. a parsing cache integrated in 
the C socket module.

----------
nosy: +gvanrossum, ncoghlan

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22127>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to