[Python-checkins] CVS: python/dist/src/Misc NEWS,1.285,1.286

Guido van Rossum gvanrossum@users.sourceforge.net
2001年10月18日 13:34:27 -0700


Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv7266/Misc
Modified Files:
	NEWS 
Log Message:
SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
This is a big one, touching lots of files. Some of the platforms
aren't tested yet. Briefly, this changes the return value of the
os/posix functions stat(), fstat(), statvfs(), fstatvfs(), and the
time functions localtime(), gmtime(), and strptime() from tuples into
pseudo-sequences. When accessed as a sequence, they behave exactly as
before. But they also have attributes like st_mtime or tm_year. The
stat return value, moreover, has a few platform-specific attributes
that are not available through the sequence interface (because
everybody expects the sequence to have a fixed length, these couldn't
be added there). If your platform's struct stat doesn't define
st_blksize, st_blocks or st_rdev, they won't be accessible from Python
either.
(Still missing is a documentation update.)
Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.285
retrieving revision 1.286
diff -C2 -d -r1.285 -r1.286
*** NEWS	2001年10月18日 19:20:25	1.285
--- NEWS	2001年10月18日 20:34:25	1.286
***************
*** 49,53 ****
 - readline now supports setting the startup_hook and the pre_event_hook.
 
! - posix supports chroot and setgroups where available.
 
 - Decompression objects in the zlib module now accept an optional
--- 49,63 ----
 - readline now supports setting the startup_hook and the pre_event_hook.
 
! - os and posix supports chroot() and setgroups() where available. The
! stat(), fstat(), statvfs() and fstatvfs() functions now return
! "pseudo-sequences" -- the various fields can now be accessed as
! attributes (e.g. os.stat("/").st_mtime) but for backwards
! compatibility they also behave as a fixed-length sequence. Some
! platform-specific fields (e.g. st_rdev) are only accessible as
! attributes.
! 
! - time: localtime(), gmtime() and strptime() now return a
! pseudo-sequence similar to the os.stat() return value, with
! attributes like tm_year etc.
 
 - Decompression objects in the zlib module now accept an optional

AltStyle によって変換されたページ (->オリジナル) /