# Revision history [back]

I tried (in the Sage shell)

K = QuadraticField(-3)
b = 1 / sqrt(-3) + (1 + sqrt(-3)) / 2

K(b)


But that failed with a TypeError exception. What is the problem?

I tried (in the Sage shell)

K a = QuadraticField(-3)
b = 1 / sqrt(-3) + (1 + sqrt(-3)) / 2

K(b)


But that failed fails with a TypeError exception. What is the problem?

K = QuadraticField(-3)

I know that I can get the generator by K.gen() but I want to be able to convert expressions to K.