<div dir="ltr"><div><div>Hi,<br><br><br></div>I&#39;m writing a custom AMP type. I noticed that when writing the unit test for garbage input, I didn&#39;t really know what exception to check for.<br><br></div>I couldn&#39;t find any place where this was formally defined, so I checked for implementation behavior. Boolean explicitly raises TypeError. Integer raises ValueError, but that appears to only be an implementation detail of int.<br>

<br>It could also be that it doesn&#39;t matter at all, but it does seem a little strange that Integer and Boolean raise different exceptions when fed garbage...<br><div><div><div><div><br>-- <br>cheers<div>lvh</div>
</div></div></div></div></div>