[issue14897] struct.pack raises unexpected error message

2012-10-30 Thread Petri Lehtinen
Petri Lehtinen added the comment: Matti Mäki wrote: > I filled up the contributor form and gave it to Petri Lehtinen 2012-10-22 Yeah, and I posted it (along with 14 other contributor forms received at PyCon Finland) to the PSF last week. They just seem to be a bit slow to process them.

[issue14897] struct.pack raises unexpected error message

2012-10-30 Thread Matti Mäki
Matti Mäki added the comment: I filled up the contributor form and gave it to Petri Lehtinen 2012-10-22 -- ___ Python tracker ___ ___

[issue14897] struct.pack raises unexpected error message

2012-10-30 Thread Petri Lehtinen
Petri Lehtinen added the comment: > You probably should have used the word 'fix' rather than 'enhance' here: > else it smells like you're putting new features into a maintenance release. > :-) Ah, true. But unfixable now :( -- ___ Python tracker

[issue14897] struct.pack raises unexpected error message

2012-10-30 Thread Mark Dickinson
Mark Dickinson added the comment: > "Enhance error messages of struct.pack and struct.pack_into" You probably should have used the word 'fix' rather than 'enhance' here: else it smells like you're putting new features into a maintenance release. :-) -- ___

[issue14897] struct.pack raises unexpected error message

2012-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Matti Mäki, can you please submit a contributor form? http://python.org/psf/contrib/contrib-form/ http://python.org/psf/contrib/ -- ___ Python tracker __

[issue14897] struct.pack raises unexpected error message

2012-10-29 Thread Petri Lehtinen
Petri Lehtinen added the comment: Applied, thanks! -- nosy: +petri.lehtinen resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue14897] struct.pack raises unexpected error message

2012-10-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 626ed0e06fd6 by Petri Lehtinen in branch '2.7': #14897: Enhance error messages of struct.pack and struct.pack_into http://hg.python.org/cpython/rev/626ed0e06fd6 New changeset a555bd4026b0 by Petri Lehtinen in branch '3.2': #14897: Enhance error mess

[issue14897] struct.pack raises unexpected error message

2012-10-24 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue14897] struct.pack raises unexpected error message

2012-10-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- components: +Extension Modules stage: -> commit review versions: +Python 3.4 ___ Python tracker ___

[issue14897] struct.pack raises unexpected error message

2012-10-23 Thread Matti Mäki
Matti Mäki added the comment: A second try, now taking into account buffer and offset params in pack_into. -- Added file: http://bugs.python.org/file27689/issue14897-2.patch ___ Python tracker _

[issue14897] struct.pack raises unexpected error message

2012-10-23 Thread Matti Mäki
Matti Mäki added the comment: Changed the error message as suggested by http://bugs.python.org/issue14897#msg161493 Also made similar change to struct.pack_into -- keywords: +patch nosy: +makimat Added file: http://bugs.python.org/file27679/issue14897.patch ___

[issue14897] struct.pack raises unexpected error message

2012-05-25 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue14897] struct.pack raises unexpected error message

2012-05-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > It might help if the error message also stated how many arguments were > actually received, like the TypeError message already does for bad function / > method calls. E.g., > > "struct.error: pack expected 2 items for packing (got 1)" Yes, this would b

[issue14897] struct.pack raises unexpected error message

2012-05-24 Thread Mark Dickinson
Mark Dickinson added the comment: It might help if the error message also stated how many arguments were actually received, like the TypeError message already does for bad function / method calls. E.g., "struct.error: pack expected 2 items for packing (got 1)" -- _

[issue14897] struct.pack raises unexpected error message

2012-05-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Funny. struct.pack(fmt, args...) is just an alias to struct.Struct(fmt).pack(args...). The error message should be changed to explicitly state that we are talking about the data for packing, and not about the arguments of function. Or should remove mention

[issue14897] struct.pack raises unexpected error message

2012-05-24 Thread Mark Dickinson
Mark Dickinson added the comment: Hmm. Yes, that's not very clear. The same message is used both for struct.pack and for Struct.pack (which struct.pack is really just a convenient alias for); it makes a bit more sense for the latter: >>> struct.Struct('1s1s').pack('33') Traceback (most rec

[issue14897] struct.pack raises unexpected error message

2012-05-23 Thread mesheb82
mesheb82 added the comment: Also, I tested this on Windows in Python 3.2.3 and Windows in Python 2.7.2 -- ___ Python tracker ___ ___

[issue14897] struct.pack raises unexpected error message

2012-05-23 Thread mesheb82
New submission from mesheb82 : I found some unexpected behavior while working with the struct module. >>> import struct This works as expected: >>> struct.pack('1s1s','3','4') '34' In this case, with bad input, the error message says I need 2 arguments, when I provide 2 arguments. >>> struct.p