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=postmas...@a.cn,o=domainAdmins,dc=iredmail,dc=org', {'mail': 
['postmas...@a.cn'], 'accountStatus': ['active'], 'enabledService': 
['awstats'], 'domainGlobalAdmin': ['yes']}), 
('mail=...@a.cn,o=domainAdmins,dc=iredmail,dc=org', {'mail': 
['w...@a.cn'], 'accountStatus': ['active'], 'domainGlobalAdmin': 
['yes']}), ('mail=w...@a.cn,o=domainAdmins,dc=iredmail,dc=org', {'mail': 
['w...@a.cn'], 'accountStatus': ['active'], 'domainGlobalAdmin': 
['no']}), ('mail=w...@a.cn,o=domainAdmins,dc=iredmail,dc=org', {'mail': 
['w...@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/


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev

Reply via email to