Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagelib
Path: blob/master/sage/structure/coerce_exceptions.py
4045 views
1
###############################################################################
2
# SAGE: System for Algebra and Geometry Experimentation
3
# Copyright (C) 2009 Robert Bradshaw <[email protected]>
4
# Distributed under the terms of the GNU General Public License (GPL)
5
# The full text of the GPL is available at:
6
# http://www.gnu.org/licenses/
7
###############################################################################
8
9
10
class CoercionException(TypeError):
11
"""
12
This is the baseclass of exceptions that the coercion model raises
13
when trying to discover coercions. We don't use standard Python
14
exceptions to avoid inadvertently catching and suppressing real errors.
15
16
Usually one raises this to indicate the attempted action isn't
17
implemented/appropriate, but if there are other things to try not
18
to immediately abort to the user.
19
"""
20
pass
21
22