Why derivated exception can not be pickled ?

Mathieu Courtois mathieu.courtois at gmail.com
Wed Sep 5 06:18:07 EDT 2012


Hello,

The simple example works fine using __reduce__:

class MyError(Exception):
    def __init__(self, arg):
        self.arg = arg

    def __reduce__(self):
        return (MyError, (self.arg, ))




More information about the Python-list mailing list