Re: [Python-Dev] [Python-checkins] cpython: Issue 14814: The new systematic tests aren't just about error reporting any

On Mon, Jul 9, 2012 at 3:22 AM, Terry Reedy <tjreedy@udel.edu> wrote:
On 7/8/2012 9:14 AM, nick.coghlan wrote: If you want to report both errors, when present:
I don't really - when there are multiple things wrong with the address, ipaddress just reports the first one it notices (e.g. IPv4Address("google.com") will complain about the lack of "." separators rather than the fact that "google" and "com" are not valid octets). This was just a case where I started to reorder the checks to do the faster one first, and then realised it was more user friendly to check the other way around (since the success case will always include both checks, it only makes a difference to the speed of rejection of some invalid cases). Most of the other validation checks have a more obvious suitable order (for example, there's no reason to start checking individual parts if we can't even split the parts up appropriately).
*cough* It's conceivable I started down this path due to using the REPL for exploration while making an initial attempt at writing method and data attribute docs over the weekend. I'm firmly in the category of IPv4 network programming engineers with next to no IPv6 experience :) Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
participants (1)
-
Nick Coghlan