[Python-checkins] r81302 - in python/branches/release26-maint: Doc/c-api/import.rst Doc/data/refcounts.dat Doc/glossary.rst Doc/library/os.rst

georg.brandl python-checkins at python.org
Wed May 19 01:13:04 CEST 2010


Author: georg.brandl
Date: Wed May 19 01:13:04 2010
New Revision: 81302

Log:
Merged revisions 79579-79580,79585-79587 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r79579 | georg.brandl | 2010-04-02 08:34:41 +0000 (Fr, 02 Apr 2010) | 1 line
  
  Add 2.6.5.
........
  r79580 | georg.brandl | 2010-04-02 08:39:09 +0000 (Fr, 02 Apr 2010) | 1 line
  
  #2768: add a note on how to get a file descriptor.
........
  r79585 | georg.brandl | 2010-04-02 09:03:18 +0000 (Fr, 02 Apr 2010) | 1 line
  
  Remove col-spanning cells in logging docs.
........
  r79586 | georg.brandl | 2010-04-02 09:07:42 +0000 (Fr, 02 Apr 2010) | 1 line
  
  Document PyImport_ExecCodeModuleEx().
........
  r79587 | georg.brandl | 2010-04-02 09:11:49 +0000 (Fr, 02 Apr 2010) | 1 line
  
  #8012: clarification in generator glossary entry.
........


Modified:
   python/branches/release26-maint/   (props changed)
   python/branches/release26-maint/Doc/c-api/import.rst
   python/branches/release26-maint/Doc/data/refcounts.dat
   python/branches/release26-maint/Doc/glossary.rst
   python/branches/release26-maint/Doc/library/os.rst

Modified: python/branches/release26-maint/Doc/c-api/import.rst
==============================================================================
--- python/branches/release26-maint/Doc/c-api/import.rst	(original)
+++ python/branches/release26-maint/Doc/c-api/import.rst	Wed May 19 01:13:04 2010
@@ -138,6 +138,9 @@
    such modules have no way to know that the module object is an unknown (and
    probably damaged with respect to the module author's intents) state.
 
+   The module's :attr:`__file__` attribute will be set to the code object's
+   :cmember:`co_filename`.
+
    This function will reload the module if it was already imported.  See
    :cfunc:`PyImport_ReloadModule` for the intended way to reload a module.
 
@@ -148,6 +151,12 @@
       *name* is removed from :attr:`sys.modules` in error cases.
 
 
+.. cfunction:: PyObject* PyImport_ExecCodeModuleEx(char *name, PyObject *co, char *pathname)
+
+   Like :cfunc:`PyImport_ExecCodeModule`, but the :attr:`__file__` attribute of
+   the module object is set to *pathname* if it is non-``NULL``.
+
+
 .. cfunction:: long PyImport_GetMagicNumber()
 
    Return the magic number for Python bytecode files (a.k.a. :file:`.pyc` and

Modified: python/branches/release26-maint/Doc/data/refcounts.dat
==============================================================================
--- python/branches/release26-maint/Doc/data/refcounts.dat	(original)
+++ python/branches/release26-maint/Doc/data/refcounts.dat	Wed May 19 01:13:04 2010
@@ -450,6 +450,11 @@
 PyImport_ExecCodeModule:char*:name::
 PyImport_ExecCodeModule:PyObject*:co:0:
 
+PyImport_ExecCodeModuleEx:PyObject*::+1:
+PyImport_ExecCodeModuleEx:char*:name::
+PyImport_ExecCodeModuleEx:PyObject*:co:0:
+PyImport_ExecCodeModuleEx:char*:pathname::
+
 PyImport_GetMagicNumber:long:::
 
 PyImport_GetModuleDict:PyObject*::0:
@@ -469,6 +474,13 @@
 PyImport_ImportModuleEx:PyObject*:locals:0:???
 PyImport_ImportModuleEx:PyObject*:fromlist:0:???
 
+PyImport_ImportModuleLevel:PyObject*::+1:
+PyImport_ImportModuleLevel:char*:name::
+PyImport_ImportModuleLevel:PyObject*:globals:0:???
+PyImport_ImportModuleLevel:PyObject*:locals:0:???
+PyImport_ImportModuleLevel:PyObject*:fromlist:0:???
+PyImport_ImportModuleLevel:int:level::
+
 PyImport_ReloadModule:PyObject*::+1:
 PyImport_ReloadModule:PyObject*:m:0:
 

Modified: python/branches/release26-maint/Doc/glossary.rst
==============================================================================
--- python/branches/release26-maint/Doc/glossary.rst	(original)
+++ python/branches/release26-maint/Doc/glossary.rst	Wed May 19 01:13:04 2010
@@ -217,6 +217,8 @@
       performs garbage collection via reference counting and a cyclic garbage
       collector that is able to detect and break reference cycles.
 
+      .. index:: single: generator
+
    generator
       A function which returns an iterator.  It looks like a normal function
       except that values are returned to the caller using a :keyword:`yield`
@@ -230,7 +232,7 @@
       .. index:: single: generator expression
 
    generator expression
-      An expression that returns a generator.  It looks like a normal expression
+      An expression that returns an iterator.  It looks like a normal expression
       followed by a :keyword:`for` expression defining a loop variable, range,
       and an optional :keyword:`if` expression.  The combined expression
       generates values for an enclosing function::

Modified: python/branches/release26-maint/Doc/library/os.rst
==============================================================================
--- python/branches/release26-maint/Doc/library/os.rst	(original)
+++ python/branches/release26-maint/Doc/library/os.rst	Wed May 19 01:13:04 2010
@@ -525,6 +525,10 @@
 is slightly deceptive; on Unix platforms, sockets and pipes are also referenced
 by file descriptors.
 
+The :meth:`~file.fileno` method can be used to obtain the file descriptor
+associated with a file object when required.  Note that using the file
+descriptor directly will bypass the file object methods, ignoring aspects such
+as internal buffering of data.
 
 .. function:: close(fd)
 


More information about the Python-checkins mailing list