1. 05 Eki, 2001 1 kayıt (commit)
  2. 04 Eki, 2001 2 kayıt (commit)
  3. 01 Eki, 2001 1 kayıt (commit)
  4. 30 Eyl, 2001 3 kayıt (commit)
  5. 28 Eyl, 2001 1 kayıt (commit)
  6. 26 Eyl, 2001 1 kayıt (commit)
    • Jeremy Hylton's avatar
      Add tests for new PyErr_NormalizeException() behavior · ede049b2
      Jeremy Hylton yazdı
      Add raise_exception() to the _testcapi module.  It isn't a test, but
      the C API exists only to support test_exceptions.  raise_exception()
      takes two arguments -- an exception class and an integer specifying
      how many arguments it should be called with.
      
      test_exceptions uses BadException() to test the interpreter's behavior
      when there is a problem instantiating the exception.  test_capi1()
      calls it with too many arguments.  test_capi2() causes an exception to
      be raised in the Python code of the constructor.
      ede049b2
  7. 25 Eyl, 2001 1 kayıt (commit)
  8. 24 Eyl, 2001 2 kayıt (commit)
  9. 23 Eyl, 2001 1 kayıt (commit)
  10. 22 Eyl, 2001 1 kayıt (commit)
  11. 20 Eyl, 2001 4 kayıt (commit)
  12. 19 Eyl, 2001 2 kayıt (commit)
  13. 18 Eyl, 2001 2 kayıt (commit)
  14. 17 Eyl, 2001 1 kayıt (commit)
  15. 15 Eyl, 2001 1 kayıt (commit)
  16. 08 Eyl, 2001 1 kayıt (commit)
  17. 07 Eyl, 2001 2 kayıt (commit)
  18. 06 Eyl, 2001 2 kayıt (commit)
  19. 05 Eyl, 2001 5 kayıt (commit)
  20. 04 Eyl, 2001 4 kayıt (commit)
  21. 31 Agu, 2001 2 kayıt (commit)
    • Guido van Rossum's avatar
      97741a30
    • Guido van Rossum's avatar
      Add warning mode for classic division, almost exactly as specified in · 393661d1
      Guido van Rossum yazdı
      PEP 238.  Changes:
      
      - add a new flag variable Py_DivisionWarningFlag, declared in
        pydebug.h, defined in object.c, set in main.c, and used in
        {int,long,float,complex}object.c.  When this flag is set, the
        classic division operator issues a DeprecationWarning message.
      
      - add a new API PyRun_SimpleStringFlags() to match
        PyRun_SimpleString().  The main() function calls this so that
        commands run with -c can also benefit from -Dnew.
      
      - While I was at it, I changed the usage message in main() somewhat:
        alphabetized the options, split it in *four* parts to fit in under
        512 bytes (not that I still believe this is necessary -- doc strings
        elsewhere are much longer), and perhaps most visibly, don't display
        the full list of options on each command line error.  Instead, the
        full list is only displayed when -h is used, and otherwise a brief
        reminder of -h is displayed.  When -h is used, write to stdout so
        that you can do `python -h | more'.
      
      Notes:
      
      - I don't want to use the -W option to control whether the classic
        division warning is issued or not, because the machinery to decide
        whether to display the warning or not is very expensive (it involves
        calling into the warnings.py module).  You can use -Werror to turn
        the warnings into exceptions though.
      
      - The -Dnew option doesn't select future division for all of the
        program -- only for the __main__ module.  I don't know if I'll ever
        change this -- it would require changes to the .pyc file magic
        number to do it right, and a more global notion of compiler flags.
      
      - You can usefully combine -Dwarn and -Dnew: this gives the __main__
        module new division, and warns about classic division everywhere
        else.
      393661d1