Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
trac #16120 change to ValueError
Browse files Browse the repository at this point in the history
  • Loading branch information
Frédéric Chapoton committed Apr 11, 2014
1 parent c71e5d9 commit e5e01d0
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -1284,11 +1284,11 @@ def __float__(self):
sage: float(E(5))
Traceback (most recent call last):
...
TypeError: E(5) is not real
ValueError: E(5) is not real
"""
if self.is_real():
return float(CDF(self).real_part())
raise TypeError("{} is not real".format(self))
raise ValueError("{} is not real".format(self))

def _rational_(self):
r"""
Expand Down

0 comments on commit e5e01d0

Please sign in to comment.