In [1]: from twisted.internet import defer
In [2]: d = defer.Deferred()
In [3]: for i in range(10):
...: d.addCallback(lambda a : a + i)
...:
...:
Out[3]: <Deferred at 0x20fd320>
Out[3]: <Deferred at 0x20fd320>
Out[3]: <Deferred at 0x20fd320>
Out[3]: <Deferred at 0x20fd320>
Out[3]: <Deferred at 0x20fd320>
Out[3]: <Deferred at 0x20fd320>
Out[3]: <Deferred at 0x20fd320>
Out[3]: <Deferred at 0x20fd320>
Out[3]: <Deferred at 0x20fd320>
Out[3]: <Deferred at 0x20fd320>
In [4]: d.callback(0)
In [5]: d
Out[5]: <Deferred at 0x20fd320 current result: 90>
In [6]: d2 = defer.succeed(0)
In [7]: for i in range(10):
...: d2.addCallback(lambda a : a + i)
...:
...:
Out[7]: <Deferred at 0x2100290 current result: 0>
Out[7]: <Deferred at 0x2100290 current result: 1>
Out[7]: <Deferred at 0x2100290 current result: 3>
Out[7]: <Deferred at 0x2100290 current result: 6>
Out[7]: <Deferred at 0x2100290 current result: 10>
Out[7]: <Deferred at 0x2100290 current result: 15>
Out[7]: <Deferred at 0x2100290 current result: 21>
Out[7]: <Deferred at 0x2100290 current result: 28>
Out[7]: <Deferred at 0x2100290 current result: 36>
Out[7]: <Deferred at 0x2100290 current result: 45>
In [8]: d2
Out[8]: <Deferred at 0x2100290 current result: 45>
这个很离谱呀。再接再厉
In [27]: d = defer.Deferred()
In [28]: d.addCallback(lambda a : a + 0)
Out[28]: <Deferred at 0x217ec68>
In [29]: d.addCallback(lambda a : a + 1)
Out[29]: <Deferred at 0x217ec68>
In [30]: d.addCallback(lambda a : a + 2)
Out[30]: <Deferred at 0x217ec68>
In [31]: d.addCallback(lambda a : a + 3)
Out[31]: <Deferred at 0x217ec68>
In [32]: d.callback(0)
In [33]: d
Out[33]: <Deferred at 0x217ec68 current result: 6>
正常。
In [35]: d = defer.Deferred()
In [36]: for i in range(4):
....: d.addCallback(lambda a : a + i)
....:
....:
Out[36]: <Deferred at 0x218e098>
Out[36]: <Deferred at 0x218e098>
Out[36]: <Deferred at 0x218e098>
Out[36]: <Deferred at 0x218e098>
In [38]: d.callback(0)
In [39]: d
Out[39]: <Deferred at 0x218e098 current result: 12>
不正常。
看来
d.addCallback(foo)
d.addCallback(bar)
同
d.addCallback(foo).addCallback(bar)
之间有微妙的区别。但具体是什么,百思不得其解。望有达人能点点拨一二。
btw: Sorry Leo Jay, 刚才发错邮箱了。
>>> fs = [(lambda n: i + n) for i in range(10)] >>> fs[3](4) 13不觉得该是
3 + 4 = 7
么?>>> [f(4) for f in fs] [13, 13, 13, 13, 13, 13, 13, 13, 13, 13].....撞石头上了... 换
def
看:>>> fs = [] >>> for i in range(10): ... def f(n): return i+n ... fs.append(f) ... >>> [f(4) for f in fs] [13, 13, 13, 13, 13, 13, 13, 13, 13, 13]其实这时候已经有点眉目了, 继续看下去:
>>> fs = [] >>> for i in range(10): ... def f(n, i=i): return i+n ... fs.append(f) ... >>> [f(4) for f in fs] [4, 5, 6, 7, 8, 9, 10, 11, 12, 13]作者提到 Haskell 是没问题的:
Prelude> let fs = [(\n -> i + n) | i <- [0..9]] Prelude> [f(4) | f <- fs]
--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
发言: pyth...@googlegroups.com
退订: python-cn+...@googlegroups.com (向此发空信即退!)
详情: http://groups-beta.google.com/group/python-cn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
In [5]: def func(n, l = []):
l.append(n)
print l
...:
...:
In [8]: func(1)
[1]
In [9]: func(2)
[1, 2]
In [10]: func(3)
[1, 2, 3]
这么有个性的东西,已经不能算bug了,得是一个feature吧。
> > 退订: python-cn+...@googlegroups.com<python-cn%2Bunsu...@googlegroups.com>(向此发空信即退!)
看来很难呀。
> >> 退订: python-cn+...@googlegroups.com<python-cn%2Bunsu...@googlegroups.com>(向此发空信即退!)
> >> 详情: http://groups-beta.google.com/group/python-cn
> >> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
> >>
> >
> > --
> > 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
> > 发言: pyth...@googlegroups.com
> > 退订: python-cn+...@googlegroups.com<python-cn%2Bunsu...@googlegroups.com>(向此发空信即退!)
> > 详情: http://groups-beta.google.com/group/python-cn
> > 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
> >
>
>
>
> --
> 无能者无所求,饱食而遨游,泛若不系之舟
>
In [38]: ls = []
In [39]: for i in range(3):
....: def f(k = i):
....: print locals()
....: ls.append(f)
....:
....:
In [40]: ls[0]()
{'k': 0}
In [41]: ls[1]()
{'k': 1}
In [42]: ls[2]()
{'k': 2}
这似乎表明,每一个已定义的 f ,都有自己独立的作用域。
而这段代码:
>>> fs = []
>>> for i in range(10):
... def f(n):
... print locals()
... return i+n
... fs.append(f)
之所以会有问题,在于,代码并没有在 f 的作用域中添加 i 这个变量,
导致每次对 i 的调用,取的都是全局的 i 值。
不大赞同你的观点呢。我刚刚试了一下,得到了下面的结果:
In [38]: ls = []
In [39]: for i in range(3):
....: def f(k = i):
....: print locals()
....: ls.append(f)
....:
....:
In [40]: ls[0]()
{'k': 0}
In [41]: ls[1]()
{'k': 1}
In [42]: ls[2]()
{'k': 2}
这似乎表明,每一个已定义的 f ,都有自己独立的作用域。
而这段代码:
>>> fs = []
>>> for i in range(10):
... def f(n):
... print locals()
... return i+n
... fs.append(f)
按照我的实验结果,每一次重复定义,都会产生一个新的 locals 与这个 func 对应。
值得注意的是,每次调用 locals() 函数的时候,它都会对当前函数的作用域进行一次全面检查(包括 return 语句中
出现的变量名,如果 return 语句中出现了未在当前域定义的变量时,它会对上级域进行递归搜索,一旦搜索到了,
即将该变量名添加到它所返回的 dict 中。而该变量的值,应该总是通过一个指针指向的。这应该才是造成你所得到
的结果的原因。)
呵呵,熄灯了,睡觉~~
在 2010年10月24日 下午8:49,Shell Xu <shell...@gmail.com> 写道:
> >> <python-cn%2Bunsu...@googlegroups.com<python-cn%252Buns...@googlegroups.com>
> >> >(向此发空信即退!)
> >> > >> 详情: http://groups-beta.google.com/group/python-cn
> >> > >> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
> >> > >>
> >> > >
> >> > > --
> >> > > 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
> >> > > 发言: pyth...@googlegroups.com
> >> > > 退订: python-cn+...@googlegroups.com<python-cn%2Bunsu...@googlegroups.com>
> >> <python-cn%2Bunsu...@googlegroups.com<python-cn%252Buns...@googlegroups.com>
> >> >(向此发空信即退!)
> >> > > 详情: http://groups-beta.google.com/group/python-cn
> >> > > 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
> >> > >
> >> >
> >> >
> >> >
> >> > --
> >> > 无能者无所求,饱食而遨游,泛若不系之舟
> >> >
> >> > --
> >> > 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
> >> > 发言: pyth...@googlegroups.com
> >> > 退订: python-cn+...@googlegroups.com<python-cn%2Bunsu...@googlegroups.com>(向此发空信即退!)
> >> > 详情: http://groups-beta.google.com/group/python-cn
> >> > 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
> >>
> >> --
> >> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
> >> 发言: pyth...@googlegroups.com
> >> 退订: python-cn+...@googlegroups.com<python-cn%2Bunsu...@googlegroups.com>(向此发空信即退!)
> >> 详情: http://groups-beta.google.com/group/python-cn
> >> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
> >>
> >
> > --
> > 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
> > 发言: pyth...@googlegroups.com
> > 退订: python-cn+...@googlegroups.com<python-cn%2Bunsu...@googlegroups.com>(向此发空信即退!)
> > 详情: http://groups-beta.google.com/group/python-cn
> > 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
> >
>
>
>
> --
> Alexander.Li
> +86 15308006505
> mail: superp...@gmail.com/superp...@hotmail.com
> site:http://alexander-lee.cnblogs.com
>
[10]: def func(incr):
....: print "func locals", locals()
....: def wrapped(base):
....: print "wrapped locals", locals()
....: return base + incr
....: return wrapped
In [16]: for i in range(10):
....: d.addCallback(func(i))
....:
....:
func locals {'incr': 0}
Out[16]: <Deferred at 0x27c7638>
func locals {'incr': 1}
Out[16]: <Deferred at 0x27c7638>
func locals {'incr': 2}
Out[16]: <Deferred at 0x27c7638>
func locals {'incr': 3}
Out[16]: <Deferred at 0x27c7638>
func locals {'incr': 4}
Out[16]: <Deferred at 0x27c7638>
func locals {'incr': 5}
Out[16]: <Deferred at 0x27c7638>
func locals {'incr': 6}
Out[16]: <Deferred at 0x27c7638>
func locals {'incr': 7}
Out[16]: <Deferred at 0x27c7638>
func locals {'incr': 8}
Out[16]: <Deferred at 0x27c7638>
func locals {'incr': 9}
Out[16]: <Deferred at 0x27c7638>
In [17]: d.callback(0)
wrapped locals {'incr': 0, 'base': 0}
wrapped locals {'incr': 1, 'base': 0}
wrapped locals {'incr': 2, 'base': 1}
wrapped locals {'incr': 3, 'base': 3}
wrapped locals {'incr': 4, 'base': 6}
wrapped locals {'incr': 5, 'base': 10}
wrapped locals {'incr': 6, 'base': 15}
wrapped locals {'incr': 7, 'base': 21}
wrapped locals {'incr': 8, 'base': 28}
wrapped locals {'incr': 9, 'base': 36}
In [18]: d
Out[18]: <Deferred at 0x27c7638 current result: 45>
这个函数跟 lambda _ : _ +i 应该是等效的。但是却没有lambda的问题。 如此看来,看来这是一个lambda的问题。
#!/usr/bin/python
from twisted.internet import defer
import pdb
d = defer.Deferred()
for i in range(3):
d.addCallback(lambda _ : _ + i)
pdb.set_trace()
--Return--
\> /dev/shm/tb(11)<module>()->None
-> pdb.set_trace()
(Pdb) pp d
<Deferred at 0x7fcd682b7950>
(Pdb) pp d.callbacks
[((<function <lambda> at 0x7fcd682e55f0>, (), {}),
(<function passthru at 0x14702a8>, None, None)),
((<function <lambda> at 0x1480aa0>, (), {}),
(<function passthru at 0x14702a8>, None, None)),
((<function <lambda> at 0x1480578>, (), {}),
(<function passthru at 0x14702a8>, None, None))]
(Pdb)
[((<function <lambda> at 0x7fcd682e55f0>, (), {}),
(<function passthru at 0x14702a8>, None, None)),
((<function <lambda> at 0x1480aa0>, (), {}),
(<function passthru at 0x14702a8>, None, None)),
((<function <lambda> at 0x1480578>, (), {}),
(<function passthru at 0x14702a8>, None, None))]
(Pdb) f1 = d.callbacks[0][0][0]
(Pdb) f2 = d.callbacks[1][0][0]
(Pdb) f3 = d.callbacks[2][0][0]
(Pdb) f1.func_globals
{'defer': <module 'twisted.internet.defer' from '/usr/lib/python2.6/dist-packages/twisted/internet/defer.pyc'>, 'f2': <function <lambda> at 0x1480aa0>, 'f3': <function <lambda> at 0x1480578>, 'd': <Deferred at 0x7fcd682b7950>, 'f1': <function <lambda> at 0x7fcd682e55f0>, '__builtins__': <module '__builtin__' (built-in)>, '__file__': './tb', '__package__': None, 'i': 2, 'pdb': <module 'pdb' from '/usr/lib/python2.6/pdb.pyc'>, '__return__': None, '__name__': '__main__', '__doc__': None}
(Pdb) f2.func_globals[i]
*** KeyError: 2
(Pdb) f2.func_globals['i']
2
(Pdb) f3.func_globals['i']
2
(Pdb) f1.func_globals['d']
<Deferred at 0x7fcd682b7950>
(Pdb) f2.func_globals['d']
<Deferred at 0x7fcd682b7950>
(Pdb) f3.func_globals['d']
<Deferred at 0x7fcd682b7950>
(Pdb)
lambda 的调试不比function,只能做到这一步了。看来是globals里面的d的引用也有问题。
此外,如果你写过parser就知道了,那可是函数到处飞的实现呀。
> > > >> <python-cn%2Bunsu...@googlegroups.com<python-cn%252Buns...@googlegroups.com>
> > <python-cn%252Buns...@googlegroups.com<python-cn%25252Bun...@googlegroups.com>
> > >
> > > >> >(向此发空信即退!)
> > > >> > >> 详情: http://groups-beta.google.com/group/python-cn
> > > >> > >> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
> > > >> > >>
> > > >> > >
> > > >> > > --
> > > >> > > 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
> > > >> > > 发言: pyth...@googlegroups.com
> > > >> > > 退订: python-cn+...@googlegroups.com<python-cn%2Bunsu...@googlegroups.com>
> > <python-cn%2Bunsu...@googlegroups.com<python-cn%252Buns...@googlegroups.com>
> > >
> > > >> <python-cn%2Bunsu...@googlegroups.com<python-cn%252Buns...@googlegroups.com>
> > <python-cn%252Buns...@googlegroups.com<python-cn%25252Bun...@googlegroups.com>
> > >
> > > >> >(向此发空信即退!)
> > > >> > > 详情: http://groups-beta.google.com/group/python-cn
> > > >> > > 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
> > > >> > >
> > > >> >
> > > >> >
> > > >> >
> > > >> > --
> > > >> > 无能者无所求,饱食而遨游,泛若不系之舟
> > > >> >
> > > >> > --
> > > >> > 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
> > > >> > 发言: pyth...@googlegroups.com
> > > >> > 退订: python-cn+...@googlegroups.com<python-cn%2Bunsu...@googlegroups.com>
> > <python-cn%2Bunsu...@googlegroups.com<python-cn%252Buns...@googlegroups.com>
> > >(向此发空信即退!)
> > > >> > 详情: http://groups-beta.google.com/group/python-cn
> > > >> > 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
> > > >>
> > > >> --
> > > >> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
> > > >> 发言: pyth...@googlegroups.com
> > > >> 退订: python-cn+...@googlegroups.com<python-cn%2Bunsu...@googlegroups.com>
> > <python-cn%2Bunsu...@googlegroups.com<python-cn%252Buns...@googlegroups.com>
> > >(向此发空信即退!)
> > > >> 详情: http://groups-beta.google.com/group/python-cn
> > > >> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
> > > >>
> > > >
> > > > --
> > > > 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
> > > > 发言: pyth...@googlegroups.com
> > > > 退订: python-cn+...@googlegroups.com<python-cn%2Bunsu...@googlegroups.com>
> > <python-cn%2Bunsu...@googlegroups.com<python-cn%252Buns...@googlegroups.com>
> > >(向此发空信即退!)
> > > > 详情: http://groups-beta.google.com/group/python-cn
> > > > 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
> > > >
> > >
> > >
> > >
> > > --
> > > Alexander.Li
> > > +86 15308006505
> > > mail: superp...@gmail.com/superp...@hotmail.com
> > > site:http://alexander-lee.cnblogs.com
> > >
> > > --
> > > 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
> > > 发言: pyth...@googlegroups.com
> > > 退订: python-cn+...@googlegroups.com<python-cn%2Bunsu...@googlegroups.com>(向此发空信即退!)
> > > 详情: http://groups-beta.google.com/group/python-cn
> > > 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
> >
> > --
> > 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
> > 发言: pyth...@googlegroups.com
> > 退订: python-cn+...@googlegroups.com<python-cn%2Bunsu...@googlegroups.com>(向此发空信即退!)
> > 详情: http://groups-beta.google.com/group/python-cn
> > 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
> >
>
>
>
> --
> 无能者无所求,饱食而遨游,泛若不系之舟
>
> --
> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
> 发言: pyth...@googlegroups.com
> 退订: python-cn+...@googlegroups.com (向此发空信即退!)
5 0 LOAD_GLOBAL 0 (i)
3 LOAD_FAST 0 (n)
6 BINARY_ADD
7 RETURN_VALUE
上面是foo这个函数的编译后的代码。
他i全都是调用的全局作用域中的i。
还是闭包问题啊。
下面是源代码。
import dis
funcs = []
for i in range(10):
def foo(n):
return i + n
print (dis.dis(foo))
funcs.append(foo)
print (funcs[3](5))
>>>>>>> <python-cn%2Bunsu...@googlegroups.com<python-cn%252Buns...@googlegroups.com>
>> <python-cn%252Buns...@googlegroups.com<python-cn%25252Bun...@googlegroups.com>
>>>
>>>> <python-cn%252Buns...@googlegroups.com<python-cn%25252Bun...@googlegroups.com>
>> <python-cn%25252Bun...@googlegroups.com<python-cn%2525252Bu...@googlegroups.com>
>>>
>>>>>
>>>>>>>> (向此发空信即退!)
>>>>>>>>>> 详情: http://groups-beta.google.com/group/python-cn
>>>>>>>>>> 严正: 理解列表! 智慧提问!
>> http://wiki.woodpecker.org.cn/moin/AskForHelp
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
>>>>>>>>> 发言: pyth...@googlegroups.com
>>>>>>>>> 退订: python-cn+...@googlegroups.com<python-cn%2Bunsu...@googlegroups.com>
>> <python-cn%2Bunsu...@googlegroups.com<python-cn%252Buns...@googlegroups.com>
>>>
>>>> <python-cn%2Bunsu...@googlegroups.com<python-cn%252Buns...@googlegroups.com>
>> <python-cn%252Buns...@googlegroups.com<python-cn%25252Bun...@googlegroups.com>
>>>
>>>>>
>>>>>>> <python-cn%2Bunsu...@googlegroups.com<python-cn%252Buns...@googlegroups.com>
>> <python-cn%252Buns...@googlegroups.com<python-cn%25252Bun...@googlegroups.com>
>>>
>>>> <python-cn%252Buns...@googlegroups.com<python-cn%25252Bun...@googlegroups.com>
>> <python-cn%25252Bun...@googlegroups.com<python-cn%2525252Bu...@googlegroups.com>
>>>>>> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
>>>>>> 发言: pyth...@googlegroups.com
>>>>>> 退订: python-cn+...@googlegroups.com<python-cn%2Bunsu...@googlegroups.com>
>> <python-cn%2Bunsu...@googlegroups.com<python-cn%252Buns...@googlegroups.com>
>>>
>>>> <python-cn%2Bunsu...@googlegroups.com<python-cn%252Buns...@googlegroups.com>
>> <python-cn%252Buns...@googlegroups.com<python-cn%25252Bun...@googlegroups.com>
>>>
>>>>> (向此发空信即退!)
>>>>>> 详情: http://groups-beta.google.com/group/python-cn
>>>>>> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Alexander.Li
>>>>> +86 15308006505
>>>>> mail: superp...@gmail.com/superp...@hotmail.com
>>>>> site:http://alexander-lee.cnblogs.com
>>>>>
>>>>> --
>>>>> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
>>>>> 发言: pyth...@googlegroups.com
>>>>> 退订: python-cn+...@googlegroups.com<python-cn%2Bunsu...@googlegroups.com>
>> <python-cn%2Bunsu...@googlegroups.com<python-cn%252Buns...@googlegroups.com>
>>> (向此发空信即退!)
>>>>> 详情: http://groups-beta.google.com/group/python-cn
>>>>> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
>>>>
>>>> --
>>>> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
>>>> 发言: pyth...@googlegroups.com
>>>> 退订: python-cn+...@googlegroups.com<python-cn%2Bunsu...@googlegroups.com>
>> <python-cn%2Bunsu...@googlegroups.com<python-cn%252Buns...@googlegroups.com>
>>> (向此发空信即退!)
>>>> 详情: http://groups-beta.google.com/group/python-cn
>>>> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
>>>>
>>>
>>>
>>>
>>> --
>>> 无能者无所求,饱食而遨游,泛若不系之舟
>>>
>>> --
>>> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
>>> 发言: pyth...@googlegroups.com
>>> 退订: python-cn+...@googlegroups.com<python-cn%2Bunsu...@googlegroups.com>(向此发空信即退!)
>>> 详情: http://groups-beta.google.com/group/python-cn
>>> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
>>
>> --
>> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
>> 发言: pyth...@googlegroups.com
>> 退订: python-cn+...@googlegroups.com<python-cn%2Bunsu...@googlegroups.com>(向此发空信即退!)
>> 详情: http://groups-beta.google.com/group/python-cn
>> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
>>
>
> --
> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
> 发言: pyth...@googlegroups.com
> 退订: python-cn+...@googlegroups.com (向此发空信即退!)
> 详情: http://groups-beta.google.com/group/python-cn
> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
-----------------------------------
Where Python Happens!
mail: linlu...@gmail.com
twitter: @linluxiang