Python充满了小巧的快捷键。Python快捷方式
例如:
self.data = map(lambda x: list(x), data)
和(虽然不是很漂亮)中无数人
tuple(t[0] for t in self.result if t[0] != 'mysql' and t[0] != 'information_schema')
。
在irc频道里,他们说“太多都不知道”。
我认为我们应该在这里列出一些,因为我喜欢使用这些快捷方式来缩短我的代码& refctor。我相信这会让很多人受益。
社区维基? – 2009-06-12 05:34:02
重复:http://stackoverflow.com/questions/101268/hidden-features-of-python – SilentGhost 2009-06-12 10:10:14
根本不重复。 – sqram 2009-06-12 10:59:49