I modified ZZ's random_element() method so that it raises a ValueError
when situations like the above occur.
I also gave RR its own random_element() method (it looks like it was
relyin on a generic one). It now that it mimics RDF.random_element():
{{{
sage: RDF.random_element(20)
5.648453007
sage: RR.random_element(20)
15.3961818555746
sage: RDF.random_element(20,30)
24.0967819625
sage: RR.random_element(20,30)
25.3797634155821
}}}
Here is the complete patch:
http://sage.math.washington.edu/home/dfdeshom/custom/patches/random_element-improv.txt