Zaur Shibzukhov

2015-03-27 7:40 GMT+03:00 Andrew Barnert <abarnert@yahoo.com>:
On Mar 26, 2015, at 21:26, Zaur Shibzukhov <szport@gmail.com> wrote:
2015-03-27 7:08 GMT+03:00 Joonas Liik <liik.joonas@gmail.com>:
namedlist perhaps? :)

if you want:"namedtuple, but mutable. " then namedlist seems like the obvious alternative..

The name 'namedlist' is already used in https://pypi.python.org/pypi/namedlist, 'mutabletuple' -- too in https://pypi.python.org/pypi/mutabletuple.

If you're trying to provide the same concept, why use a completely unrelated name? That's like saying 'I want an ordered set, but there's already an "orderedset" on PyPI so I went with "sortedsequence"'.

The name recordarray is means that it 1) array of objects and 2) record with access to fields by attributes.

But how is being "an array of objects" any different from what a tuple, list, array.array, bytearray, bytes, str, etc. already are? What's specifically array-like about this type as opposed to all of those? And what's specifically record-like about your type compared to namedtuple, Struct, or SimpleNamespace?

I am inclined to the fact that it's better to rename `objectarray` to 'mutabletuple' in order to be explicit about what is that.
'recordarray' is a factory function that make exactly the same as 'namedtuple' factory does (except that it create subclass of 'mutabletuple' and make '_replace' to update the 'self', not make a copy). So may be it's better to call it as 'record' or 'recordtype', or even 'recordfactory'?