Author pfalcon
Recipients loewis, ncoghlan, pfalcon, serhiy.storchaka, terry.reedy
Date 2014-04-13.16:17:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1397405853.13.0.255634659317.issue21180@psf.upfronthosting.co.za>
In-reply-to
Content
Martin:

> People might expect that array.array('i', 3) creates an array with the single value 3.

I don't know which people would expect that. Personally I recognize the need to create an empty array of of given size, and have read the docs for builtin "bytearray" type, and expect extension type array.array to work the same. I'd even say that I found any other expectations ungrounded, in particular, a way to create an array of single int is obviously bytearray([3]) or array.array('i', [3]).

Anyway, as I say in "2014-04-13 15:29" comment, I'm only glad to follow with PEP467 changes. Unfortunately, I don't seem to be able to update initial ticket description with updated proposal.


> array.array('i', len=3)

The whole scope of this ticket is to have consistent API between bytearray and array.array. So, the only way I could suggest (or back) the above is if PEP467 was changed too, and as you suggest, I don't do that. (I personally also dislike overuse of keyword args.)

> In any case, it is unlikely that anything will be done with this issue unless you provide a patch (and that still would be no guarantee that somebody accepts it).

The ending is the saddest. As I mentioned, the best outcome I could imagine of such reports is that people who consider changing builtin types to also consider obvious stdlib counterparts too. (There's another issue - stdlib is indeed enormous, so it would be nice to separate it (speculatively) into ["builtin types/lib"], "core stdlib", and "extended stdlib". There's clear difference between array module and for example unittest or logging.

Thanks for hint re: mailing Nick Coghlan - nice to know that's acceptable, that's certainly easier than figuring out which mailing list to use and then to follow it. (I see that Nick is in noselist of this ticket, but I guess I'll mail him anyway to have my conscience clear that I did everything to make Python better (== more consistent)).
History
Date User Action Args
2014-04-13 16:17:33pfalconsetrecipients: + pfalcon, loewis, terry.reedy, ncoghlan, serhiy.storchaka
2014-04-13 16:17:33pfalconsetmessageid: <1397405853.13.0.255634659317.issue21180@psf.upfronthosting.co.za>
2014-04-13 16:17:33pfalconlinkissue21180 messages
2014-04-13 16:17:32pfalconcreate