New submission from Andrii V. Mishkovskyi <[EMAIL PROTECTED]>:

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?

----------
components: Library (Lib)
messages: 69208
nosy: jnoller, mishok13, roudkerk
severity: normal
status: open
title: multiprocessing and meaningful errors
type: feature request
versions: Python 2.6, Python 3.0

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3273>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to