By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,272 Members | 1,733 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,272 IT Pros & Developers. It's quick & easy.

this must be a stupid question ...

P: n/a
but I can;t find the answer ;-)

As searching for the '$' sign doesn't work well in the help files,
I can not find out, where is the '$' sign used for.

If I try to use it in names,
I get a compiler error,
so it probably has some special meaning.

thanks,
Stef Mientki
Jul 28 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On 2007-07-28, Stef Mientki <S.**************@mailbox.kun.nlwrote:
but I can;t find the answer ;-)

As searching for the '$' sign doesn't work well in the help
files, I can not find out, where is the '$' sign used for.

If I try to use it in names, I get a compiler error, so it
probably has some special meaning.
It means something in regular expressions, namely, the end of the
string/line.

--
Neil Cerutti
Jul 28 '07 #2

P: n/a
On 28/07/07, Stef Mientki <S.**************@mailbox.kun.nlwrote:
but I can;t find the answer ;-)

As searching for the '$' sign doesn't work well in the help files,
I can not find out, where is the '$' sign used for.

If I try to use it in names,
I get a compiler error,
so it probably has some special meaning.
Hi Stef,

It has no special meaning in the Python language, beyond being invalid
for use in identifiers. I believe there is a new string formatting
module which interprets it when it is part of a format string, but
nothing in the core language.

If you look at the language grammar, you can see why this is an error

http://docs.python.org/ref/identifiers.html
David.

>
thanks,
Stef Mientki
--
http://mail.python.org/mailman/listinfo/python-list
Jul 28 '07 #3

P: n/a
Stef Mientki wrote:
but I can;t find the answer ;-)

As searching for the '$' sign doesn't work well in the help files,
I can not find out, where is the '$' sign used for.

If I try to use it in names,
I get a compiler error,
so it probably has some special meaning.

thanks,
Stef Mientki
The $ is not used in any Python syntax. Neither in variable names nor
any syntactical construct.

Of course, like any character, it can be used in strings. (And some
packages, like re, will make special use of a $ in a string.)

Gary Herron

Jul 28 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.