22-08-2009 o 19:46:51 Kee Nethery <k...@kagi.com> wrote:
I'm not sure I know the difference between a string variable and a
literal string. Is the difference as simple as:
somestring = u'<stuff>hello world</stuff>'
fromstring(somestring) <-- string variable
vs
XML(u'<stuff>hello world</stuff>') <-- literal string
Yes, simply:
s = 'hello world'
# ^
# it is a *string literal*
s # <- it is a *string object*
# (or rather a name referring to it :-))
(In Python we have rather 'names' than 'variables', though -- as
a mental leap -- they are commonly referred to as 'variables',
regarding other languages' terminology).
Cheers,
*j
--
Jan Kaliszewski (zuo) <z...@chopin.edu.pl>
--
http://mail.python.org/mailman/listinfo/python-list