Script Test But(cool result :))

i was testing a blender script today and made a little mistake.
the bug result was interesting

http://img70.imageshack.us/img70/4089/scriptbug2nk3.jpg
and
http://img158.imageshack.us/img158/6778/scriptbug3ii7.jpg

And, may I ask you, what did you actually want to do? And which script did you actually use?

its my own script, and it is supposed to make a primitive circle in blender python, with different structure.
i have had to use a circle like this for quite many times and i thought i could write a script for it.(you can adjust resolution,number of loops, ovalness etc)