classification
Title: multiprocessing and meaningful errors
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.0, Python 2.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Remove assertion-based checking in multiprocessing
View: 5001
Assigned To: jnoller Nosy List: jnoller, mishok13, roudkerk
Priority: low Keywords:

Created on 2008-07-03 17:03 by mishok13, last changed 2009-01-22 19:22 by jnoller. This issue is now closed.

Messages (2)
msg69208 - (view) Author: Andrii V. Mishkovskyi (mishok13) Date: 2008-07-03 17:03
multiprocessing uses a lot of `assert` statements all over the code. I
propose to change this way to a more readable and understandable. For
example:
Lib/multiprocessing/managers.py, line 136:
assert isinstance(authkey, bytes)
From my point of view, raising an AssertionError is not enough in this
case. I propose changing this one to more intuitive:
if not isinstance(authkey, bytes):
   raise TypeError("'authkey' argument should be an instance of 'bytes'")
(Well, maybe message could be more descriptive. :) )

And this goes for all of the multiprocessing code base.
Should I consider writing a patch for this?
msg80374 - (view) Author: Jesse Noller (jnoller) * (Python committer) Date: 2009-01-22 19:22
I am going to track this as part of issue 5001
History
Date User Action Args
2009-01-22 19:22:11jnollersetstatus: open -> closed
resolution: duplicate
superseder: Remove assertion-based checking in multiprocessing
messages: + msg80374
2009-01-22 19:17:24jnollersetpriority: low
2009-01-19 16:42:35jnollersetassignee: jnoller
2008-07-03 17:03:28mishok13create