Re: "RuntimeError: dictionary changed size during iteration" ; Good atomic copy operations?

2006-03-11 Thread EleSSaR^
r-existed state: import random random.seed() fromd = {1:1, 2:2, 3:3, 4:4, 5:5} print "dict before iteration:", fromd def rt_save_dict_copy(): tod={} for k in fromd.keys(): try: tod[k]=fromd[k] except: pass fromd[random.choice(xrange(1,6))] = random.

Re: "RuntimeError: dictionary changed size during iteration" ; Good atomic copy operations?

2006-03-11 Thread EleSSaR^
robert si è profuso/a a scrivere su comp.lang.python tutte queste elucubrazioni: [cut] P.S. I'm very bad at threaded programming. Please verify any of my suggestions ^_^ -- EleSSaR^ <[EMAIL PROTECTED]> -- Togli .xyz dalla mia email per contattarmi. -- http://mail.python.org/mailm

Re: "RuntimeError: dictionary changed size during iteration" ; Good atomic copy operations?

2006-03-11 Thread EleSSaR^
gt; PS: how does ZODB work with this kind of problem? I thought is uses cPickle? I have no idea about this. -- EleSSaR^ <[EMAIL PROTECTED]> -- Togli .xyz dalla mia email per contattarmi. -- http://mail.python.org/mailman/listinfo/python-list

Re: "RuntimeError: dictionary changed size during iteration" ; Good atomic copy operations?

2006-03-11 Thread EleSSaR^
f your own. -- EleSSaR^ <[EMAIL PROTECTED]> -- Togli .xyz dalla mia email per contattarmi. -- http://mail.python.org/mailman/listinfo/python-list

Re: looping over more than one list

2006-02-16 Thread EleSSaR^
Iain King si è profuso/a a scrivere su comp.lang.python tutte queste elucubrazioni: [cut] I think you should take a look at the zip() function. You can use for with it like this: for elem1, elem2, elem3 in zip(list1, list2, list3): -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dal

Re: SQLObject connection pooling

2006-01-14 Thread EleSSaR^
will have better luck on gmane.comp.python.sqlobject this group is a bit too generic for such fine-tuned questions. -- EleSSaR^ <[EMAIL PROTECTED]> -- Togli .xyz dalla mia email per contattarmi. -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic wrappers for SQL?

2006-01-14 Thread EleSSaR^
It's a native object database; it uses sqlite as backend, but that's totally transparent to the user, you'll never be asked to enter a single sql statement. -- EleSSaR^ <[EMAIL PROTECTED]> -- Togli .xyz dalla mia email per contattarmi. -- http://mail.python.org/mailman/listinfo/python-list

Re: pyvm source code

2005-12-30 Thread EleSSaR^
stelios xanthakis si è profuso/a a scrivere su comp.lang.python tutte queste elucubrazioni: > What's good about it is that it's small and easier to > hack and write large scale programs using pyvm as the > base runtime. On the other hand, pyvm is not compatible > with python and AFAIC there is no