-
Raymond Hettinger yazdı
The code isn't exactly equivalent because a classmethod would only make sense inside a chain class, and it would need "cls" as a first argument, and it would need to return an instance of "chain" rather than a generator. The updated example drops the @classmethod decorator so that it can be used standalone: list(from_iterable(['abc', 'def'])) This should be communicate what from_iterable does.
c195b4e8
Adı |
Son kayıt (commit)
|
Son güncelleme |
---|---|---|
.. | ||
c-api | ||
data | ||
distutils | ||
extending | ||
faq | ||
howto | ||
includes | ||
install | ||
library | ||
reference | ||
tools | ||
tutorial | ||
using | ||
whatsnew | ||
Makefile | ||
README.txt | ||
about.rst | ||
bugs.rst | ||
conf.py | ||
contents.rst | ||
copyright.rst | ||
glossary.rst | ||
license.rst | ||
make.bat |