1. 19 Jan, 2001 30 commits
  2. 18 Jan, 2001 10 commits
    • Guido van Rossum's avatar
      Add test that ensures hash() of objects defining __cmp__ or __eq__ but · 2312024e
      Guido van Rossum authored
      not __hash__ raises TypeError.
      2312024e
    • Guido van Rossum's avatar
      Rich comparisons fallout: instance_hash() should check for both · 65e8bd7f
      Guido van Rossum authored
      __cmp__ and __eq__ absent before deciding to do a quickie
      based on the object address.  (Tim Peters discovered this.)
      65e8bd7f
    • Guido van Rossum's avatar
    • Guido van Rossum's avatar
      Rich comparisons fallout: PyObject_Hash() should check for both · 41c32448
      Guido van Rossum authored
      tp_compare and tp_richcompare NULL before deciding to do a quickie
      based on the object address.  (Tim Peters discovered this.)
      41c32448
    • Guido van Rossum's avatar
      Changes to recursive-object comparisons, having to do with a test case · a3af41d5
      Guido van Rossum authored
      I found where rich comparison of unequal recursive objects gave
      unintuituve results.  In a discussion with Tim, where we discovered
      that our intuition on when a<=b should be true was failing, we decided
      to outlaw ordering comparisons on recursive objects.  (Once we have
      fixed our intuition and designed a matching algorithm that's practical
      and reasonable to implement, we can allow such orderings again.)
      
      - Refactored the recursive-object comparison framework; more is now
        done in the support routines so less needs to be done in the calling
        routines (even at the expense of slowing it down a bit -- this
        should normally never be invoked, it's mostly just there to avoid
        blowing up the interpreter).
      
      - Changed the framework so that the comparison operator used is also
        stored.  (The dictionary now stores triples (v, w, op) instead of
        pairs (v, w).)
      
      - Changed the nesting limit to a more reasonable small 20; this only
        slows down comparisons of very deeply nested objects (unlikely to
        occur in practice), while speeding up comparisons of recursive
        objects (previously, this would first waste time and space on 500
        nested comparisons before it would start detecting recursion).
      
      - Changed rich comparisons for recursive objects to raise a ValueError
        exception when recursion is detected for ordering oprators (<, <=,
        >, >=).
      
      Unrelated change:
      
      - Moved PyObject_Unicode() to just under PyObject_Str(), where it
        belongs.  MAL's patch must've inserted in a random spot between two
        functions in the file -- between two helpers for rich comparison...
      a3af41d5
    • Guido van Rossum's avatar
      Since I'm about to check in a change to the recursion-detection code · 4e8db2ed
      Guido van Rossum authored
      for comparisons that outlaws requets for ordering on recursive data
      structures, remove the tests for ordering recursive data structures.
      4e8db2ed
    • Andrew M. Kuchling's avatar
      Patch #103313: Fixes "make test" by adding a little file named · 95695e2f
      Andrew M. Kuchling authored
          "platform", running the Python binary to create it, and then
          using it to set PYTHONPATH.
      95695e2f
    • Andrew M. Kuchling's avatar
      Patch from Barry: gets rid of two unused imports, · 5bbc7b92
      Andrew M. Kuchling authored
         wraps to 80chars, and adds some really hacky setting of compiler
         options when CC and LDSHARED are given on the make command line.
         (The Distutils should probably provide a utility function to
          automatically handle a number of common environment variables)
      5bbc7b92
    • Tim Peters's avatar
      Clarifications. · befc97ca
      Tim Peters authored
      befc97ca
    • Andrew M. Kuchling's avatar
      Sizable reorganization of how header and library files are found · fbe73769
      Andrew M. Kuchling authored
      Check additional include directories for SSL
      Don't build modules that are linked into the Python binary statically
      Factored out the detection of Tkinter out into a method, since it's
          the most complicated module to set up
      Simplify the logic for detecting Tkinter
      fbe73769