On Tue, Nov 11, 2014 at 10:24:00AM +1100, Ben Finney wrote:
Clayton Kirkwood c...@godblessthe.us writes:
Also of confusion, the library reference says:
Match objects always have a boolean value of True. Since match() and
search() return None when there is no match, you can test whether
So, there is a difference between None and False, is that the issue? I don’t
necessarily see the difference as stated in the subject line.
A=True
If A == True
If A
Is this the crux of the issue?
BTW, the feedback to my submittal suggests that this is a difference with no
Clayton Kirkwood c...@godblessthe.us writes:
Also of confusion, the library reference says:
Match objects always have a boolean value of True. Since match() and
search() return None when there is no match, you can test whether there was
a match with a simple if statement:
match =
I reported it. I feel all grown up now. Kind of like one of the boys(girls...)
Clayton:)
-Original Message-
From: Tutor [mailto:tutor-bounces+crk=godblessthe...@python.org] On
Behalf Of Ben Finney
Sent: Monday, November 10, 2014 3:24 PM
To: tutor@python.org
Subject: [Tutor] “has a value
good catch, and definitely a distinction beginners should be more cognizant
of.
it's also good to recognize that a call to bool(match) would render that
statement correct, as the built-in/factory function will return what an
object evaluates to (True [re.match object] or/vs.False [None]).
On