Re: Python vs C for a mail server

2006-01-28 Thread Nicolas Lehuen
Jens Theisen wrote: > Please don't be offended, but if anyone could make a point of how Python's > disadvantages in these regards could be alleviated, I'd be very > interested. > > Jens Well, I write Java, C++ and Python code, and I have posted a few thoughts about this on my blog : http://nicola

Re: Python vs C for a mail server

2006-01-28 Thread Nicolas Lehuen
If your friend is proficient in C/C++ then learning Python should not be a pain. Quite the contrary, it should be an enlightnement. Being good in C/C++ AND Python is a killer combination, as you can promptly and efficiently code big chunks of your application in Python and interface with C/C++ code

Re: Patch : doct.merge

2005-12-28 Thread Nicolas Lehuen
Here's method 3 : # Python 2.3 (no generator expression) a.update([(k,v) for k,v in b.iteritems() if k not in a]) # Python 2.4 (with generator expression) a.update((k,v) for k,v in b.iteritems() if k not in a) It's a bit cleaner but still less efficient than using what's already in the PyDict_Me

Patch : doct.merge

2005-12-27 Thread Nicolas Lehuen
Hi, I've posted this patch on Source forge : http://sourceforge.net/tracker/index.php?func=detail&aid=1391204&group_id=5470&atid=305470 If you want to update a dictionary with another one, you can simply use update : a = dict(a=1,c=3) b = dict(a=0,b=2) a.update(b) assert a == dict(a=0,b=2,c=3)

Re: Comparing 2 similar strings?

2005-05-25 Thread nicolas . lehuen
anglo-saxon way) which may not be the right way (hence the examples given before for Gaellic surnames). But these ones are far "better" than soundex. Regards, Nicolas Lehuen -- http://mail.python.org/mailman/listinfo/python-list