A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2009-September/091878.html below:

[Python-Dev] conceptual clarity

[Python-Dev] conceptual clarityR. David Murray rdmurray at bitdance.com
Fri Sep 18 04:25:24 CEST 2009
On Fri, 18 Sep 2009 at 02:24, Sebastian Rittau wrote:
> On Thu, Sep 17, 2009 at 02:04:11PM -0400, R. David Murray wrote:
>
>> I mean, eg, IPv4Network.fromHostIP('192.168.1.1/24').
>
> I'd actually suggest to use
>
>  >>> net, host = parse_network_and_host("192.168.111.33/24")
>  (IPv4Network('192.168.111.0/24'), IPv4Address('192.168.111.33'))
>  >>>
>
> I think this helps the use case of the short network+gateway notation,
> while keeping the concepts of network and host address cleanly separate.
>
> Then the regular IPv4Network constructor could be strict and can be used
> for validation.

I'd be happy with this solution, which was also suggested earlier
by someone else (Antoine?).

--David
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4