This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients serhiy.storchaka
Date 2016-07-02.06:40:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1467441608.13.0.484194759608.issue27438@psf.upfronthosting.co.za>
In-reply-to
Content
The implementation of iterators for str, bytes, bytearray, tuple and list is virtually the same. Proposed patch moves common code to the template file iterlib.h and parametrizes it with few macros.

The patch decreases the number of source lines by 600.

 Makefile.pre.in                    |    2 
 Objects/bytearrayobject.c          |  165 ------------
 Objects/bytesobject.c              |  167 -------------
 Objects/iterlib.h                  |  168 +++++++++++++
 Objects/listobject.c               |  468 ++++++++++--------------------------
 Objects/tupleobject.c              |  156 ------------
 Objects/unicodeobject.c            |  171 -------------
 PCbuild/pythoncore.vcxproj         |    1 
 PCbuild/pythoncore.vcxproj.filters |    3 
 9 files changed, 349 insertions(+), 942 deletions(-), 10 modifications(!)
History
Date User Action Args
2016-07-02 06:40:08serhiy.storchakasetrecipients: + serhiy.storchaka
2016-07-02 06:40:08serhiy.storchakasetmessageid: <1467441608.13.0.484194759608.issue27438@psf.upfronthosting.co.za>
2016-07-02 06:40:07serhiy.storchakalinkissue27438 messages
2016-07-02 06:40:06serhiy.storchakacreate