Message153469
| Author |
jaap.karssenberg |
| Recipients |
ezio.melotti, jaap.karssenberg, michael.foord, r.david.murray |
| Date |
2012年02月16日.09:15:09 |
| SpamBayes Score |
4.3541992e-09 |
| Marked as misclassified |
No |
| Message-id |
<CA+TmwMHdWt34DX7P54+671UcZS4eF5eSkmCMFzWUUe2X+CAsiw@mail.gmail.com> |
| In-reply-to |
<1329348544.52.0.316662412612.issue14025@psf.upfronthosting.co.za> |
| Content |
On Thu, Feb 16, 2012 at 12:29 AM, Michael Foord <report@bugs.python.org>wrote:
> The type check in assertEqual, that delegates to the different comparison
> methods, is strict because we can't know that using the error message
> algorithms is sane for arbitrary subclasses - all we can know is whether an
> equality comparison fails or succeeds.
>
So would you allow me to register a method for type "basestring" and have
assertEqual dispatch to that method when both arguments are of this type ?
That way at least I could customize the behavior in sub classes.
Thanks,
Jaap |
|