From: Steven D'Aprano st...@pearwood.info
To: Python Mailing List tutor@python.org
Sent: Sunday, June 3, 2012 4:00 AM
Subject: Re: [Tutor] How to identify clusters of similar files
Albert-Jan Roskam wrote:
Hi,
I want to use difflib to compare a lot (tens of thousands) of text files. I
Hi all,
I am trying to understand when it is appropriate to use None as in the
following example
if abc != None:
print abc is not None
1) Can I use it to determine if the variable abc exists?
2) Can I use it to determine if the variable abc does not contain anything?
Many thanks
--
On Sun, 3 Jun 2012 23:43:30 +0200
Tehn Yit Chin tehn.yit.c...@gmail.com tehn.yit.c...@gmail.com wrote:
Hi all,
I am trying to understand when it is appropriate to use None as in the
following example
if abc != None:
print abc is not None
The proper idiom, for a variety of
Corey Richardson wrote:
[snip]
(I've been away from Python for a bit, one of the other tutors might
correct me with better practice things, I'm rusty!)
Your reply is good.
--
Steven
___
Tutor maillist - Tutor@python.org
To unsubscribe or change
On 03/06/12 22:43, Tehn Yit Chin wrote:
I am trying to understand when it is appropriate to use None as in the
following example
if abc != None:
print abc is not None
In general I only use that idf its a defaulted parameter to a function:
def foo(x=None):
if x is None:
do
On 04/06/12 01:39, Alan Gauld wrote:
for var in (a,b,c):
if not var:
print var.__name__, ' is empty or false'
Oops, that won't work. __name__ is not an attribute
of object, which I thought it was...
But hopefully the intention was clear.
--
Alan G
Author of the Learn to
I was trying to install Python on Ubuntu 12.04 and Im getting this error
message when entering the make -j command:
Parser/grammar1.o: file not recognized: File truncated
collect2: ld returned 1 exit status
make: *** [Parser/pgen] Error 1
make: *** Waiting for unfinished jobs
I was
On Sun, Jun 3, 2012 at 9:41 PM, Wh1t3ha7 wh1t3...@tormail.org wrote:
I was trying to install Python on Ubuntu 12.04 and Im getting this error
message when entering the make -j command:
Parser/grammar1.o: file not recognized: File truncated
collect2: ld returned 1 exit status
make: ***