[Python-Dev] PEP 3144 review. (original) (raw)
Peter Moody peter at hda3.com
Wed Sep 16 03:08:05 CEST 2009
- Previous message: [Python-Dev] PEP 3144 review.
- Next message: [Python-Dev] PEP 3144 review.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, Sep 15, 2009 at 5:33 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
Antoine Pitrou <solipsis pitrou.net> writes:
I don't see any valid reason for entering a network as "192.168.1.1/24" rather than the canonical "192.168.1.0/24". The former might indicate a typing error or a mental slip, so let's be helpful and signal it to the user. Or perhaps there can be an optional "strict=True" (or "strict=False") argument to the constructor / parsing function.
I can live w/ a default of strict=False. there are plenty of cases where it's not an error and easy enough ways to check, if the developer is concerned, with or without an option. eg if addr.ip != addr.network:
Cheers, /peter
Regards
Antoine.
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/python-dev%40hda3.com
- Previous message: [Python-Dev] PEP 3144 review.
- Next message: [Python-Dev] PEP 3144 review.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]