1. 08 Eyl, 1997 4 kayıt (commit)
  2. 07 Eyl, 1997 8 kayıt (commit)
  3. 06 Eyl, 1997 6 kayıt (commit)
  4. 05 Eyl, 1997 8 kayıt (commit)
    • Guido van Rossum's avatar
      Fixed some details of printing the str() of an exception. This fixes · d6bf45bc
      Guido van Rossum yazdı
      a core dump when __str__() returns a non-string, and plugs a memory
      leak as well: the result of PyObject_Str() was never DECREFed.
      d6bf45bc
    • Guido van Rossum's avatar
      Made the 'info' argument to SyntaxError optional, so phase-2 syntax · f394f56c
      Guido van Rossum yazdı
      errors are handled (these gave ``TypeError: not enough arguments'').
      
      Also changed its __str__() to correct a typo (missing self.) and
      return str(self.msg) to ensure the result is always string.
      
      Also changed the default __str__ to simply return str(self.args).
      f394f56c
    • Fred Drake's avatar
      Fix in trailing comment: PyDict_SetItemString() does *not* consume a reference · 49bb0e32
      Fred Drake yazdı
      count, PyList_SetItem() does.  Very confusing!
      49bb0e32
    • Guido van Rossum's avatar
      First part of package support. · aee0bad0
      Guido van Rossum yazdı
      This doesn't yet support "import a.b.c" or "from a.b.c import x", but
      it does recognize directories.  When importing a directory, it
      initializes __path__ to a list containing the directory name, and
      loads the __init__ module if found.
      
      The (internal) find_module() and load_module() functions are
      restructured so that they both also handle built-in and frozen modules
      and Mac resources (and directories of course).  The imp module's
      find_module() and (new) load_module() also have this functionality.
      Moreover, imp unconditionally defines constants for all module types,
      and has two more new functions: find_module_in_package() and
      find_module_in_directory().
      
      There's also a new API function, PyImport_ImportModuleEx(), which
      takes all four __import__ arguments (name, globals, locals, fromlist).
      The last three may be NULL.  This is currently the same as
      PyImport_ImportModule() but in the future it will be able to do
      relative dotted-path imports.
      
      Other changes:
      
      - bltinmodule.c: in __import__, call PyImport_ImportModuleEx().
      
      - ceval.c: always pass the fromlist to __import__, even if it is a C
      function, so PyImport_ImportModuleEx() is useful.
      
      - getmtime.c: the function has a second argument, the FILE*, on which
      it applies fstat().  According to Sjoerd this is much faster.  The
      first (pathname) argument is ignored, but remains for backward
      compatibility (so the Mac version still works without changes).
      
      By cleverly combining the new imp functionality, the full support for
      dotted names in Python (mini.py, not checked in) is now about 7K,
      lavishly commented (vs. 14K for ni plus 11K for ihooks, also lavishly
      commented).
      
      Good night!
      aee0bad0
    • Guido van Rossum's avatar
      Added PyImport_ImportModuleEx(name, globals, locals, fromlist); this · 026de199
      Guido van Rossum yazdı
      is like PyImport_ImporModule(name) but receives the globals and locals
      dict and the fromlist arguments as well.  (The name is a char*; the
      others are PyObject*s).
      026de199
    • Guido van Rossum's avatar
      Contribution by Hannu Krosing (with some changes). · 9eb671fa
      Guido van Rossum yazdı
      Added 'p' format character for Pascal string (i.e. leading length
      byte).  This uses the count prefix line 's' does, except that the
      count includes the length byte; i.e. '10p' takes 10 bytes packed but
      has space for a length byte and 9 data bytes.
      9eb671fa
    • Guido van Rossum's avatar
    • Guido van Rossum's avatar
      Get rid of most silly #include and #ifdefs near the top; these are all · 8102c005
      Guido van Rossum yazdı
      obsolete now it includes Python.h.
      
      Make all functions K&R compatible (Sue Williams).
      8102c005
  5. 04 Eyl, 1997 7 kayıt (commit)
  6. 03 Eyl, 1997 7 kayıt (commit)