[Python-ideas] BindError as a built-in TypeError subclass (on the margin of PEP 362 discussion)

Steven D'Aprano steve at pearwood.info
Sun Jun 10 02:52:02 CEST 2012

Jan Kaliszewski wrote:

> The present behaviour (ad 2. and 3.), i.e. raising TypeError, makes it
> hard to differentiate call-argument-related errors from other TypeError
> occurrences.
> Raising BindError (or ArgumentError? the actual name is disputable of
> course), being a TypeError instance, instead -- would made easier
> implementing test suites, RPC mechanisms etc.


Since this will be an error that beginners see (frequently), I suggest 
ArgumentError is more friendly than BindError.


More information about the Python-ideas mailing list