#python - Wed 16 May 2007 between 16:52 and 17:07



Cianticwhich is nicer indeed
ZenMasterJGivazquez: doesn't that use is, not ==
?
ivazquezI don't think so...
ZenMasterJGhmm
Peng>>> 1 in (1.0,)
True
Looks like ==.
ZenMasterJGyep, guess so
starGaming1 in Eq(foo, bar, baz) where Eq defines __contains__ could be a way.
ZenMasterJGthats pretty ugly if you're going to be using more complex objects. i would've expected is.
whats a good way to flatten a dict into something hashable?
ivazquezWhy not just turn it into a tuple?
ZenMasterJGivazquez: how?
ivazqueztuple([1, 2, 3])
jon___blazehi, I'm new to python and not sure about the os module
ZenMasterJGivazquez: a dict, not a list. tuple({'key
er
innervisionjon___blaze: what's the problem?
ZenMasterJGstupid enter key
ivazquezOh. Dict.
ZenMasterJGtuple( {'key': 'value'} ) == ('key',)
yeah
ivazquezI think I remember seeing an immutable dict somewhere.
Did you check the libref??
Worst case you could use .items().
tnksI'm confused by the documentation that says that Popen3 objects are generated by the popen3 factory. popen3 seems to return a 3-tuple of file descriptors.
jon___blazeI have a directory with 7 sub-directories with a file named all docs (i.e main_dir/sub(7)/docs) I've googled and can't understand how
tnksCan someone help me sort this out?
ZenMasterJGivazquez: yeah, items would work i guess
it doens't need to be pretty, it just needs to be quick & hashable
jon___blazesorry and I want to have them listed for reading (file/sub_file/docs)
pbxjon___blaze: Listed?
ivazqueztnks: Which popen3?
douglas_hello all. quick question from a total noob. I have an array and I want put something it it. a[0]=1 but it fails. How do I set up the array?
ivazqueza=[]
Peng"list" :P
jon___blazepbx: like return each with the name doc... (e.g. - ./dir1/doc - ./dir2/doc)
douglas_and then a[0]=1 still fails. I tried it. :-}
Penga.append(1)

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 

IrcArchive