<div id="comment:0"></div> Also fix the following: ``` sage: NF.<a> = QuadraticField(-2) sage: CIF(a) ... ValueError: can not convert complex algebraic number to real interval ``` We also deal with Python 3 compatibility regarding `int`/`long` and `bytes`/`unicode`. Depends on #24423 CC: @tscrim Component: **coercion** Author: **Jeroen Demeyer** Branch/Commit: **[`9ac1612`](https://github.com/sagemath/sagetrac-mirror/commit/9ac1612c342c66a5d574a6c824b064e2a2ec076c)** Reviewer: **Travis Scrimshaw** _Issue created by migration from https://trac.sagemath.org/ticket/24371_