[Python-3000] PEP 3108: Standard Library Reorganization
Brett Cannon
brett at python.org
Wed Jan 3 00:21:33 CET 2007
On 1/1/07, Mike Orr <sluggoster at gmail.com> wrote:
>
> On 1/1/07, Brett Cannon <brett at python.org> wrote:
> > * thread
> > + People should use 'threading' instead.
>
> 'threading' has no equivalent to 'thread.get_ident()'. If this
> function is ported, I'd support renaming 'thread'. You need it to
> print "Thread #123 doing bla bla bla" messages, to distinguish threads
> in a thread pool, to keep track of thread-local data, etc. The
> threading.Thread name isn't the same thing because it's an arbitrary
> string, not a guaranteed-unique integer, and the routine creating the
> threads may be third-party and not setting unique identifiers.
This one you are going to have to argue it out with the people who want to
hide the interface. As for thread.get_ident(), it could be added to
threading.
> * stat
> > + ``os.stat`` now returns a tuple with attributes.
>
> Certain things in 'stat' do not exist elsewhere: S_ISCHR, S_ISBLK,
> S_ISFIFO, S_ISSOCK. These could be made into more friendly
> os.path.is*() functions that take the pathname rather than the
> st_mode. I've never used them, but it would be a pity to make people
> calculate the bitmasks manually.
It would be better to add them as methods to the tuple object returned by
os.stat. But the module should still go.
> * fileinput
>
> +1 to leave it.
People seem to really like this module, so it can stay.
-Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-3000/attachments/20070102/d35e4bf5/attachment.htm
More information about the Python-3000
mailing list