Re: [Python-ideas] IPLike objects

2018-10-21 Thread Damla Altun
> I followed your instructions and appended them to the last commit of > DamlaAltun/cpython (branch: _iplike-socket)[0] . > >> > - Bytes and Integer support removed, only allowed string and IPLike. If > string passed in it returns without any func call / modification. [1] > - IPLike moved to socket

Re: [Python-ideas] IPLike objects

2018-10-21 Thread Andrew Svetlov
Should we support bytes? Why? For path name, the bytes are sometimes the only way to encode the file name, Posix operates with bytes internally. But IP addresses are always ASCII strings. I doubt if we shall support bytes for it, complicating the implementation. Support for `int` in `get_addr()` i

[Python-ideas] IPLike objects

2018-10-21 Thread Damla Altun
Hi, Python's ipaddress module is really good for working with network / IP related thing. I would like to use ipaddress.IPv4/v6Address in creating network interfaces. Like a socket but i can't, the internal things and some standard libraries doesn't support them (even socket). >>> server_addr