[issue3693] Obscure array.array error message

2019-05-25 Thread Matthias Bussonnier


Change by Matthias Bussonnier :


--
pull_requests:  -13484

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3693] Obscure array.array error message

2019-05-25 Thread Matthias Bussonnier


Change by Matthias Bussonnier :


--
pull_requests: +13484
pull_request: https://github.com/python/cpython/pull/13577

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3693] Obscure array.array error message

2013-11-29 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti :


--
assignee:  -> alexandre.vassalotti
resolution:  -> fixed
stage: commit review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3693] Obscure array.array error message

2013-11-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2c87d3944c7a by Alexandre Vassalotti in branch 'default':
Issue #3693: Fix array obscure error message when given a str.
http://hg.python.org/cpython/rev/2c87d3944c7a

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3693] Obscure array.array error message

2013-04-20 Thread Ezio Melotti

Changes by Ezio Melotti :


--
stage: needs patch -> commit review
versions: +Python 3.4 -Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3693] Obscure array.array error message

2013-04-19 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

Here's a patch to fix the exception.

--
keywords: +patch
Added file: http://bugs.python.org/file29949/fix_array_err_msg.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3693] Obscure array.array error message

2013-04-18 Thread Martin Morrison

Changes by Martin Morrison :


--
nosy: +isoschiz

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3693] Obscure array.array error message

2011-11-16 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
versions: +Python 3.3 -Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3693] Obscure array.array error message

2011-01-11 Thread Éric Araujo

Changes by Éric Araujo :


--
components: +Extension Modules -Library (Lib)
nosy: +alexandre.vassalotti, georg.brandl
stage: unit test needed -> needs patch
versions: +Python 2.7, Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3693] Obscure array.array error message

2009-05-16 Thread Daniel Diniz

Daniel Diniz  added the comment:

FWIW, in trunk the message for unicode strings is the same:
>>> array.array('b', u'fox')
Traceback (most recent call last):
  File "", line 1, in 
TypeError: an integer is required

--
nosy: +ajaksu2
priority:  -> normal
stage:  -> test needed
type:  -> behavior
versions: +Python 3.1 -Python 3.0

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3693] Obscure array.array error message

2008-08-26 Thread Terry J. Reedy

New submission from Terry J. Reedy <[EMAIL PROTECTED]>:

In 2.5
>>> import array
>>> a = array.array('b', 'fox')
>>>

In 3.0
>>> import array
>>> a = array.array('b', 'fox')
Traceback (most recent call last):
  File "", line 1, in 
a = array.array('b', 'fox')
TypeError: an integer is required

This puzzled me because an integer argument most certainly is not
allowed (one would raise other exceptions.)  Then I realized that 'an
integer' here actually means 'an iterator producing integers' or more
exactly, 'an iterable whose iterator yields integers in the range
implied by the type code'.  What I would like to see is something like

TypeError: for typecode 'b', the optional initializer must be an
iterable of 1 byte integers (such as bytes).

I would also like to see a minor change in the array and array.array
docstrings.  Array.__doc__ lists the typecodes, array.array.__doc__
lists all the other info needed, so that help(array) gives everything
while help(array.array) omits the needed typecode info.  So I would like
to see the typecode info moved to the class docstring with everything
else (and replaced by 'Defines one class: array') so help(array) and
help(array.array) would both give all needed info.

--
components: Library (Lib)
messages: 72004
nosy: tjreedy
severity: normal
status: open
title: Obscure array.array error message
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com