[Tutor] returning the entire line when regex matches
Alan Gauld
alan.gauld at btinternet.com
Mon May 4 00:19:14 CEST 2009
"Steve Willoughby" <steve at alchemy.com> wrote
>>> if re.search != (r'Domains:', line):
>>
>> Because you are assigning a tuple containing a string and a line of text
>> to a name which is currently bound to a function object (re.search)
>
> Actually, he's COMPARING the two, not assigning. But comparing a
> function object and a tuple is still not going to do anything sensible.
So he is, I didn't notice the ! in there.
I really must start wearing my glasses when using the PC!!! :-(
Alan G.
More information about the Tutor
mailing list