homepage

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 arigo
Recipients
Date 2005年12月27日.16:16:40
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=4771
Attached a second patch, extending PySequence_Repeat() and
PySequence_Concat() to match more precisely their
documentation, which says that they should be equivalent
to multiplication and addition respectively, at least when
the proper arguments are sequences.
In 2.4 and HEAD, it works with new-style instances defining
__add__ or __mul__, but it does not work with old-style
instances. If the concat_repeat_cleanup.diff patch is
checked in, then it stops working for new-style instances
too. So the sequence_operations.diff patch cleans up the
situation by making this work in all cases.
Compatibility note: PySequence_Concat/Repeat() are mostly
never used in the core; they are essentially only used by
operator.concat() and operator.repeat(). Both patches
together should thus not break existing code and could be
considered as a bug fix. I'd recommend that we check them
in both HEAD and the 2.4 branch.
The patch also addresses PySequence_InPlaceConcat/Repeat()
but without testing them -- they can't be tested from
Python, so they are already completely untested.
History
Date User Action Args
2007年08月23日 15:45:06adminlinkissue1390657 messages
2007年08月23日 15:45:06admincreate

AltStyle によって変換されたページ (->オリジナル) /