# Using a python 3 class in SageMath

I wrote a class that uses some python 3 features (specifically, functools.lru_cache).

When I try to import it into my SageMath notebook, I get errors, since the notebook runs on Python 2.7.

I read in this FAQ: http://doc.sagemath.org/html/en/faq/f... that the answer to the question "Can I use Sage with Python 3.x?" is: "Currently, no. Sage depends on the SciPy stack of Python numerical and scientific packages. As of 2010, SciPy still uses Python 2.x. So until SciPy is ported to run with Python 3.x and Cython supports Python 3.x, Sage will continue to use Python 2.x."

But, this answer is from 2010. Now it's 2016, and SciPy already supports Python 3.

So, my questions are: * Is it possible now to use SageMath with Python 3 * If not, is there a workaround I can use to import my class to SageMath notebook?

See https://trac.sagemath.org/ticket/15530