1. 20 Şub, 2005 2 kayıt (commit)
    • Raymond Hettinger's avatar
      * Beef-up testing of str.__contains__() and str.find(). · 7cbf1bcb
      Raymond Hettinger yazdı
      * Speed-up "x in y" where x has more than one character.
      
      The existing code made excessive calls to the expensive memcmp() function.
      The new code uses memchr() to rapidly find a start point for memcmp().
      In addition to knowing that the first character is a match, the new code
      also checks that the last character is a match.  This significantly reduces
      the incidence of false starts (saving memcmp() calls and making quadratic
      behavior less likely).
      
      Improves the timings on:
          python -m timeit -r7 -s"x='a'*1000" "'ab' in x"
          python -m timeit -r7 -s"x='a'*1000" "'bc' in x"
      
      Once this code has proven itself, then string_find_internal() should refer
      to it rather than running its own version.  Also, something similar may
      apply to unicode objects.
      7cbf1bcb
    • Guido van Rossum's avatar
      54c273c7
  2. 19 Şub, 2005 1 kayıt (commit)
    • Ka-Ping Yee's avatar
      Use getdoc(object) instead of object.__doc__ to fix indentation problems. · bba6acc7
      Ka-Ping Yee yazdı
      Thanks to Robert Dick <dickrp@ece.northwestern.edu> for reporting this bug
      and submitting a patch.
      
      Adjust doc(object) to display useful documentation for plain values (e.g.
      help([]) now shows the methods on the list instead of just printing "[]").
      
      (This change has been tested interactively, by generating docs for the
      standard library, and by running the module documentation webserver.)
      bba6acc7
  3. 18 Şub, 2005 5 kayıt (commit)
  4. 17 Şub, 2005 10 kayıt (commit)
  5. 16 Şub, 2005 2 kayıt (commit)
  6. 15 Şub, 2005 4 kayıt (commit)
  7. 14 Şub, 2005 1 kayıt (commit)
  8. 13 Şub, 2005 2 kayıt (commit)
  9. 11 Şub, 2005 1 kayıt (commit)
  10. 10 Şub, 2005 6 kayıt (commit)
  11. 09 Şub, 2005 3 kayıt (commit)
  12. 08 Şub, 2005 3 kayıt (commit)