all: fix iterable object, implement filter, map, oct and optimise hex#222
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
all: support filter builtin feature and fix iterable object
Python-3.4.9/Doc/c-api/iterator.rst
Python-3.4.9/Lib/test/test_builtin.pyIn CPython,
Squares (5)is an iterable object, and to support this type of iterable object, I made modifications toIterator. goIterator. go
Corresponding CPython code
Python-3.4.9/Objects/iterobject.cand
Iter()Corresponding CPython code
Python-3.4.9/Objects/abstract.cFinally,
filterandmapmethods were fully implementedpy/tests/filter.pyis a copy ofPython-3.4.9/Lib/test/test_builtin.py:BuiltinTest.test_filter()and
py/tests/map.pyis a copy ofPython-3.4.9/Lib/test/test_builtin.py:BuiltinTest.test_map()builtin: Implement oct and optimise hex
Through benchmark testing, the speed of
hexhas indeed been improvedMy English is not very good, so forgive me for not providing sufficient explanations. Welcome to ask questions here