This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients belopolsky, georg.brandl, jcea, lemburg, mark.dickinson, ncoghlan, pitrou
Date 2011-02-24.21:21:10
SpamBayes Score 4.1327497e-12
Marked as misclassified No
Message-id <AANLkTi=7zVzeZaHkUMRQnaQKgNhMV=FFGygBw7X+n1Yr@mail.gmail.com>
In-reply-to <1298581635.3722.2.camel@localhost.localdomain>
Content
It seems appropriate to consult python-dev on this.  I thought
ValueError was for values that are valid Python objects but out of
acceptable range of the function.  Errors that can only be triggered
in C code normally handled with either assert() or raise SystemError.
I think you are splitting hairs too thin by distinguishing between
stdlib and 3rd party extensions.

On Thu, Feb 24, 2011 at 4:07 PM, Antoine Pitrou <report@bugs.python.org> wrote:
>
> Antoine Pitrou <pitrou@free.fr> added the comment:
>
>> > I've committed the part of the patch which disallows a NULL data pointer
>> > with PyMemoryView_FromBuffer in r88550 and r88551.
>>
>> Is it possible to create such buffer in Python (other than by
>> exploiting a bug or writing a rogue extension module)?  If not, this
>> should be a SystemError or even just an assert() rather than
>> ValueError.
>
> I'm against asserts for such use, since they get disabled in non-debug
> mode (which is the mode 99.99% of users run in).
>
> As for SystemError, it means "Internal error in the Python interpreter",
> which isn't the case here (most likely it's an error in an extension
> module instead, possibly a third-party one).
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue11286>
> _______________________________________
>
History
Date User Action Args
2011-02-24 21:21:11belopolskysetrecipients: + belopolsky, lemburg, georg.brandl, jcea, mark.dickinson, ncoghlan, pitrou
2011-02-24 21:21:10belopolskylinkissue11286 messages
2011-02-24 21:21:10belopolskycreate