pow() works but sqrt() not!?
siggi
smusnmrNOSPAM at yahoo.com
Thu Jan 4 04:56:43 EST 2007
Thank you Tõnis, both for the link and your patient explanation :-)
Siggi
"tonisk" <metsakuri at gmail.com> schrieb im Newsbeitrag
news:1167903337.816250.196540 at 51g2000cwl.googlegroups.com...
> >if you want math functions to your current namespace use:
> >>> from math import *What is a "namespace" and what is the difference
> >>> between ">>>import math"
> and ">>>from math import *" ?
for namespaces read this
http://www.network-theory.co.uk/docs/pytut/tut_68.html
import math creates new namespace "math" for names in that module, so
you can acess them by prefixing them with "math", like math.sqrt(9).
from math import * imports all names to your local scope, so you do not
have to prefix them, sqrt(9)
--
Tõnis
More information about the Python-list
mailing list