Hey,

On Wed, Apr 05, 2017 at 05:25:01PM +0200, Ronny Pfannschmidt wrote:
> while experimenting i learned of the fun fact that None is a "valid
> exception type"
> for except clauses on at least python 2.7

But it doesn't seem to be possible to raise it:

    Python 2.7.13 (default, Dec 21 2016, 07:16:46)
    >>> raise None
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    TypeError: exceptions must be old-style classes or derived from 
BaseException, not NoneType

Florian

-- 
http://www.the-compiler.org | [email protected] (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/

Attachment: signature.asc
Description: PGP signature

_______________________________________________
pytest-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pytest-dev

Reply via email to