1. 02 Agu, 2004 9 kayıt (commit)
  2. 01 Agu, 2004 5 kayıt (commit)
  3. 31 Tem, 2004 8 kayıt (commit)
    • Tim Peters's avatar
      list_ass_slice(): Document the obscure new intent that deleting a slice · 8fc4a916
      Tim Peters yazdı
      of no more than 8 elements cannot fail.
      
      listpop():  Take advantage of that its calls to list_resize() and
      list_ass_slice() can't fail.  This is assert'ed in a debug build now, but
      in an icky way.  That is, you can't say:
      
      	assert(some_call() >= 0);
      
      because then some_call() won't occur at all in a release build.  So it
      has to be a big pile of #ifdefs on Py_DEBUG (yuck), or the pleasant:
      
              status = some_call();
              assert(status >= 0);
      
      But in that case, compilers may whine in a release build, because status
      appears unused then.  I'm not certain the ugly trick I used here will
      convince all compilers to shut up about status (status is always "used" now,
      as the first (ignored) clause in a comma expression).
      8fc4a916
    • Tim Peters's avatar
      Whitespace normalization. · c0cbc861
      Tim Peters yazdı
      c0cbc861
    • Tim Peters's avatar
      Be more careful about reverting mutuations to system-wide (sys) variables. · 579f7355
      Tim Peters yazdı
      This fixes 15 spurious test failures on Windows (probably all due to
      the test leaving a wrong path in sys.argv[0], which then prevented
      regrtest.py from finding the expected-output files for tests running
      after test_optparse).
      579f7355
    • Greg Ward's avatar
      Mention upgrade of optparse to Optik 1.5a1. · 9c8fe1a9
      Greg Ward yazdı
      9c8fe1a9
    • Greg Ward's avatar
      Upgrade optparse module and tests to Optik 1.5a1: · eba20e60
      Greg Ward yazdı
        * add expansion of default values in help text: the string
          "%default" in an option's help string is expanded to str() of
          that option's default value, or "none" if no default value.
        * bug #955889: option default values that happen to be strings are
          now processed in the same way as values from the command line; this
          allows generation of nicer help when using custom types.  Can
          be disabled with parser.set_process_default_values(False).
        * bug #960515: don't crash when generating help for callback
          options that specify 'type', but not 'dest' or 'metavar'.
        * feature #815264: change the default help format for short options
          that take an argument from e.g. "-oARG" to "-o ARG"; add
          set_short_opt_delimiter() and set_long_opt_delimiter() methods to
          HelpFormatter to allow (slight) customization of the formatting.
        * patch #736940: internationalize Optik: all built-in user-
          targeted literal strings are passed through gettext.gettext().  (If
          you want translations (.po files), they're not included with Python
          -- you'll find them in the Optik source distribution from
          http://optik.sourceforge.net/ .)
        * bug #878453: respect $COLUMNS environment variable for
          wrapping help output.
        * feature #988122: expand "%prog" in the 'description' passed
          to OptionParser, just like in the 'usage' and 'version' strings.
          (This is *not* done in the 'description' passed to OptionGroup.)
      eba20e60
    • Tim Peters's avatar
      list_ass_slice(): The difference between "recycle" and "recycled" was · 7357222d
      Tim Peters yazdı
      impossible to remember, so renamed one to something obvious.  Headed
      off potential signed-vs-unsigned compiler complaints I introduced by
      changing the type of a vrbl to unsigned.  Removed the need for the
      tedious explanation about "backward pointer loops" by looping on an
      int instead.
      7357222d
    • Tim Peters's avatar
      Armin asked for a list_ass_slice review in his checkin, so here's the · 8d9eb10c
      Tim Peters yazdı
      result.
      
      list_resize():  Document the intent.  Code is increasingly relying on
      subtle aspects of its behavior, and they deserve to be spelled out.
      
      list_ass_slice():  A bit more simplification, by giving it a common
      error exit and initializing more values.
      
      Be clearer in comments about what "size" means (# of elements?  # of
      bytes?).
      
      While the number of elements in a list slice must fit in an int, there's
      no guarantee that the number of bytes occupied by the slice will.  That
      malloc() and memmove() take size_t arguments is a hint about that <wink>.
      So changed to use size_t where appropriate.
      
      ihigh - ilow should always be >= 0, but we never asserted that.  We do
      now.
      
      The loop decref'ing the recycled slice had a subtle insecurity:  C doesn't
      guarantee that a pointer one slot *before* an array will compare "less
      than" to a pointer within the array (it does guarantee that a pointer
      one beyond the end of the array compares as expected).  This was actually
      an issue in KSR's C implementation, so isn't purely theoretical.  Python
      probably has other "go backwards" loops with a similar glitch.
      list_clear() is OK (it marches an integer backwards, not a pointer).
      8d9eb10c
    • Tim Peters's avatar
      Repair typo in docstring. · bcc95cb7
      Tim Peters yazdı
      bcc95cb7
  4. 30 Tem, 2004 6 kayıt (commit)
  5. 29 Tem, 2004 12 kayıt (commit)