Lichen

Change of lib/__builtins__/exception/unicode.py

410:0c59d603a569
lib/__builtins__/exception/unicode.py
     1.1 --- a/lib/__builtins__/exception/unicode.py	Thu Dec 15 01:40:31 2016 +0100
     1.2 +++ b/lib/__builtins__/exception/unicode.py	Thu Dec 15 16:09:01 2016 +0100
     1.3 @@ -3,7 +3,7 @@
     1.4  """
     1.5  Unicode exception objects.
     1.6  
     1.7 -Copyright (C) 2015 Paul Boddie <paul@boddie.org.uk>
     1.8 +Copyright (C) 2015, 2016 Paul Boddie <paul@boddie.org.uk>
     1.9  
    1.10  This program is free software; you can redistribute it and/or modify it under
    1.11  the terms of the GNU General Public License as published by the Free Software
    1.12 @@ -19,7 +19,22 @@
    1.13  this program.  If not, see <http://www.gnu.org/licenses/>.
    1.14  """
    1.15  
    1.16 -class UnicodeDecodeError(Exception): pass
    1.17 +class UnicodeDecodeError(Exception):
    1.18 +
    1.19 +    """
    1.20 +    An exception indicating a failure to interpret a byte sequence according to
    1.21 +    a character encoding.
    1.22 +    """
    1.23 +
    1.24 +    def __init__(self, value):
    1.25 +
    1.26 +        """
    1.27 +        Initialise an exception with a 'value' providing the illegal byte
    1.28 +        sequence responsible for the error.
    1.29 +        """
    1.30 +
    1.31 +        self.value = value
    1.32 +
    1.33  class UnicodeEncodeError(Exception): pass
    1.34  class UnicodeError(Exception): pass
    1.35  class UnicodeTranslateError(Exception): pass