Re: [Tutor] Recursively flatten the list

2011-03-24 Thread Tom Zych
it's more general. Does anyone see a way to do this with a list comprehension? I don't. Would be a neat hack if it can be done. -- Tom Zych / freethin...@pobox.com Because if they didn't vote for a lizard, said Ford, the wrong lizard might get in. -- DNA

Re: [Tutor] if os.path.exists() or if not os.path.exists()?

2011-03-24 Thread Tom Zych
' +shx + \n) if os.path.exists(dbf): print 'El archivo ' +dbf +' existe' log.write('No existe el archivo ' +dbf + \n) I don't know about the rest, but you're missing an else: between the last two lines. -- Tom Zych / freethin...@pobox.com Because if they didn't

Re: [Tutor] Checksum program

2011-03-23 Thread Tom Zych
= a character (string of length 1) from message print Processing, i -- Tom Zych / freethin...@pobox.com Because if they didn't vote for a lizard, said Ford, the wrong lizard might get in. -- DNA ___ Tutor maillist - Tutor@python.org

Re: [Tutor] atr in dir Vs. hasattr

2011-03-16 Thread Tom Zych
suppose there must be some reliable way to get a list of *all* an object's attributes, but I don't see it. -- Tom Zych / freethin...@pobox.com ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org

Re: [Tutor] Static Variable in Functions

2011-03-15 Thread Tom Zych
Steven D'Aprano wrote: Most of the common built-in Python objects are immutable: ... while a few are mutable: lists dicts sets Also, bytearrays. -- Tom Zych / freethin...@pobox.com ___ Tutor maillist - Tutor@python.org To unsubscribe