Copy Classes
copy.Error()
Module-specific exception class. Not every copying failure uses this exception; unsupported operations can raise TypeError or another exception. The example explicitly simulates a module-specific error.
Formal Syntax & Structure
python syntaxpython
copy.ErrorReturn Value
type
The type result described above.
Working Example
Example Snippetpython
import copytry: raise copy.Error("copy rejected")except copy.Error as e: print(str(e))