|
From: Zhang H. <zhb...@gm...> - 2009-05-15 12:45:15
|
Michael Ströder wrote:
>
> Sorry, there's a typo in there:
>
> cmp=lambda x,y: cmp(x[0].lower(), y[0}.lower())
> ^
> Should be ]
I found that before, but got the same error:
>>> alist
[('mail=postmaster@a.cn,o=domainAdmins,dc=iredmail,dc=org', {'mail':
['postmaster@a.cn'], 'accountStatus': ['active'], 'enabledService':
['awstats'], 'domainGlobalAdmin': ['yes']}),
('mail=www@a.cn,o=domainAdmins,dc=iredmail,dc=org', {'mail':
['www@a.cn'], 'accountStatus': ['active'], 'domainGlobalAdmin':
['yes']}), ('mail=www5@a.cn,o=domainAdmins,dc=iredmail,dc=org', {'mail':
['www5@a.cn'], 'accountStatus': ['active'], 'domainGlobalAdmin':
['no']}), ('mail=www3@a.cn,o=domainAdmins,dc=iredmail,dc=org', {'mail':
['www3@a.cn'], 'accountStatus': ['active'], 'domainGlobalAdmin': ['no']})]
>>> cmp=lambda x,y: cmp(x[0].lower(), y[0].lower())
>>> alist.sort(cmp)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<stdin>", line 1, in <lambda>
File "<stdin>", line 1, in <lambda>
File "<stdin>", line 1, in <lambda>
File "<stdin>", line 1, in <lambda>
File "<stdin>", line 1, in <lambda>
File "<stdin>", line 1, in <lambda>
File "<stdin>", line 1, in <lambda>
File "<stdin>", line 1, in <lambda>
...... SKIP MANY LINES HERE ......
File "<stdin>", line 1, in <lambda>
File "<stdin>", line 1, in <lambda>
File "<stdin>", line 1, in <lambda>
File "<stdin>", line 1, in <lambda>
RuntimeError: maximum recursion depth exceeded
--
Best regards.
Zhang Huangbin
- Open Source Mail Server Solution for RHEL, CentOS, Debian:
http://code.google.com/p/iredmail/
|