Is this a BUG?
David Porter
jcm at bigskytel.com
Thu Dec 28 07:14:06 EST 2000
* QdlatY <qdlaty at wielun.dhs.org>:
> I have script:
> ----------------
> import cgi
>
> form = cgi.FieldStorage()
>
> print form
> print "!",form["index"].value,"!"
> ------------------
> I launched it with parameter index=1
> And this is an output:
> ----------------
> FieldStorage(None, None, [MiniFieldStorage('index', '1')])
> ! 1 !
> ----------------
> ^ ^
> Why the hell there are spaces? index property has value '1'!
> not ' 1 '?!
Because you asked for them:
>>> print 'a', 'b'
a b
>>> print 'a'+'b'
ab
>>> print 'a' 'b'
ab
see: http://www.python.org/doc/current/ref/print.html
Also, there are several tutorials on this page which will prime you on the
basics of Python: http://www.python.org/doc/Intros.html
David
More information about the Python-list
mailing list