]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
SF patch #1390657:
authorArmin Rigo <arigo@tunes.org>
Thu, 29 Dec 2005 15:59:19 +0000 (15:59 +0000)
committerArmin Rigo <arigo@tunes.org>
Thu, 29 Dec 2005 15:59:19 +0000 (15:59 +0000)
commitfd163f92cee2aa8189879bd43670782f4cfd2cf8
tree9bd3785dde016396b17a006059c68b3e4b60023e
parentc4308d5be64a622ee7be685c5eb05f90782711c1
SF patch #1390657:

* set sq_repeat and sq_concat to NULL for user-defined new-style
  classes, as a way to fix a number of related problems.  See
  test_descr.notimplemented()).  One of these problems was fixed
  in r25556 and r25557 but many more existed; this is a general
  fix and thus reverts r25556-r25557.

* to avoid having PySequence_Repeat()/PySequence_Concat() failing
  on user-defined classes, they now fall back to nb_add/nb_mul if
  sq_concat/sq_repeat are not defined and the arguments appear to
  be sequences.

* added tests.

Backport candidate.
Lib/test/test_descr.py
Lib/test/test_operator.py
Objects/abstract.c
Objects/typeobject.c