Use of the is statement

2008-06-27 Thread Joel Corbin
Hello, I'm trying to clarify what exactly the behaviour of the is statement is (or should be). Naturally, this has been nearly impossible to google for, even using quotations... It is my impression that the is statement should be equivalent to ==, at least on some level. However, this equivalency

Re: what is meaning of @ in pyhon program.

2008-06-27 Thread Joel Corbin
Hi Evan, The @ is a decorator, knowing this should help you search for a better explanation than I could give... Have a look here to start: http://mail.python.org/pipermail/tutor/2006-September/048978.html Joel On Fri, Jun 27, 2008 at 10:48 AM, Evan [EMAIL PROTECTED] wrote: HI, When I

Re: Use of the is statement

2008-06-27 Thread Joel Corbin
Thank you Gary, Cédric, Christian. When *would *one use is? Cédric... the problem I was having was purely an issue of comparison if file.tell() is 0L was returning False. Strangely enough, if file.tell() is 0 returns True in the right cases. I assume this is related to the None case? On Fri,

Re: Simple regular expression

2008-06-27 Thread Joel Corbin
If you read John's message carefully (which is the output of help(re.search)) you can see the difference between re.search and re.match. The former looks for a regex anywhere in the given string, the latter requires the string to begin with the given regex. Joel On Fri, Jun 27, 2008 at 12:26 PM,