[issue3589] Misleading names for multiprocessing "convenience" functions

Nick Coghlan report at bugs.python.org
Mon Sep 1 13:57:53 CEST 2008


Nick Coghlan <ncoghlan at gmail.com> added the comment:

Patch attached that removes the misleading "convenience" functions,
replacing them with explicit imports of the appropriate names.

The patch also adds docstrings to some of the original class definitions
that were missing them.

No changes were needed to the multiprocessing tests - they all still
passed with this change, and the docs are still accurate as well (I
would actually say this change makes the docs MORE accurate).

Python 2.6b3+ (trunk:66083, Aug 31 2008, 19:00:32)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import multiprocessing as mp
>>> isinstance(mp.Lock(), mp.Lock)
True
>>> mp.Lock.__name__
'Lock'
>>> mp.Lock.__module__
'multiprocessing.synchronize'

----------
keywords: +patch
Added file: http://bugs.python.org/file11323/issue3589_true_aliases_in_multiprocessing.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3589>
_______________________________________


More information about the Python-bugs-list mailing list