On 9/4/2018 3:03 PM, Chris Barker via Python-ideas wrote:
Chiming in here:
dataclasses was just added to the stdlib.
I understand that record class is not the same thing, but the use cases
do overlap a great deal.
So I think the cord goal for anyone that wants to see this in the stdlib
is
Chiming in here:
dataclasses was just added to the stdlib.
I understand that record class is not the same thing, but the use cases do
overlap a great deal.
So I think the cord goal for anyone that wants to see this in the stdlib is
to demonstrate tbat recordclass
Adds significant enough value
---
*Zaur Shibzukhov*
2018-09-03 1:02 GMT+03:00 Wes Turner :
>
> On Sunday, September 2, 2018, Zaur Shibzukhov wrote:
>
>>
>>
>> ---
>> *Zaur Shibzukhov*
>>
>>
>> 2018-09-02 22:11 GMT+03:00 Wes Turner :
>>
>>> Does the value of __hash__ change when attributes of a recordclass
>>> change?
>>>
понедельник, 3 сентября 2018 г., 2:11:06 UTC+3 пользователь Greg Ewing
написал:
>
> Zaur Shibzukhov wrote:
>
> > `Recordclass` is defined on top of` memoryslots` just like `namedtuple`
> > above` tuple`. Attributes are accessed via a descriptor (`itemgetset`),
> > which supports both`
On Mon, Sep 3, 2018 at 4:40 AM Chris Angelico wrote:
> On Mon, Sep 3, 2018 at 6:31 PM, Wes Turner wrote:
> >
> >
> > On Mon, Sep 3, 2018 at 4:17 AM Chris Angelico wrote:
> >>
> >> On Mon, Sep 3, 2018 at 5:23 PM, Jacco van Dorp
> >> wrote:
> >> > This feels really useful to me to make some
On Mon, Sep 3, 2018 at 6:31 PM, Wes Turner wrote:
>
>
> On Mon, Sep 3, 2018 at 4:17 AM Chris Angelico wrote:
>>
>> On Mon, Sep 3, 2018 at 5:23 PM, Jacco van Dorp
>> wrote:
>> > This feels really useful to me to make some quick changes to a database
>> > -
>> > perhaps a database layer could
On Mon, Sep 3, 2018 at 4:17 AM Chris Angelico wrote:
> On Mon, Sep 3, 2018 at 5:23 PM, Jacco van Dorp
> wrote:
> > This feels really useful to me to make some quick changes to a database -
> > perhaps a database layer could return an class of type Recordclass, and
> then
> > you just simply
On Mon, Sep 3, 2018 at 5:23 PM, Jacco van Dorp wrote:
> This feels really useful to me to make some quick changes to a database -
> perhaps a database layer could return an class of type Recordclass, and then
> you just simply mutate it and shove it back into the database. Pseudocode:
>
> record
On Mon, Sep 3, 2018 at 3:25 AM Jacco van Dorp wrote:
> This feels really useful to me to make some quick changes to a database -
> perhaps a database layer could return an class of type Recordclass, and
> then you just simply mutate it and shove it back into the database.
> Pseudocode:
>
>
On Mon, Sep 3, 2018 at 3:25 AM Jacco van Dorp wrote:
> Also, it's rather clear that namedList is a really bad name for a
> Recordclass. It's cleary not intended to be a list. It's a record you can
> take out from somewhere, mutate, and push back in.
>
So call it "namedrecord", perhaps?
This feels really useful to me to make some quick changes to a database -
perhaps a database layer could return an class of type Recordclass, and
then you just simply mutate it and shove it back into the database.
Pseudocode:
record = database.execute("SELECT * FROM mytable WHERE primary_key =
On Sun, Sep 02, 2018 at 10:56:50PM +0200, Martin Bammer wrote:
> Compared to dataclass:
> dataclass wins only on the topic object size. When it comes to speed and
> functionality (indexing, sorting) dataclass would be my last choice.
I see no sign that recordclass supports sorting. (But I admit
Zaur Shibzukhov wrote:
> `Recordclass` is defined on top of` memoryslots` just like `namedtuple`
> above` tuple`. Attributes are accessed via a descriptor (`itemgetset`),
> which supports both` __get__` and `__set__` by the element index.
>
> As a result, `recordclass` takes up as much memory
On Sunday, September 2, 2018, Zaur Shibzukhov wrote:
>
>
> ---
> *Zaur Shibzukhov*
>
>
> 2018-09-02 22:11 GMT+03:00 Wes Turner :
>
>> Does the value of __hash__ change when attributes of a recordclass change?
>>
>
> Currently recordclass's __hash__ didn't implemented.
>
Hi,
then intention of my first mail was to start a discussion about this
topic about the pros and cons and possible alternatives.
As long as it is not clear that recordclass or something like that is
accepted to be implemented to the collections module
I do not want to spend any effort on
As the author of `recordclass` I would like to shed some light...
Recorclass originated as a response to the
[question](https://stackoverflow.com/questions/29290359/existence-of-mutable-named-tuple-in-python/29419745#29419745)
on stackoverflow.
`Recordclass` was conceived and implemented as a
On Sat, Sep 01, 2018 at 05:10:49PM +0100, Jonathan Fine wrote:
> Hi Martin
>
> Summary: Thank you. Your suggestion has good points. I suggest to
> advance it (i) provide a pure Python implementation of namedlist, and
> (ii) ask that the Python docs for namedtuple provide a link to
> namedlist.
>
>
> -- Forwarded message --
> From: Martin Bammer
> To: python-ideas@python.org
> Cc:
> Bcc:
> Date: Sat, 1 Sep 2018 09:47:04 +0200
> Subject: [Python-ideas] Add recordlcass to collections module
> Hi,
>
> what about adding recordclass
On Sat, Sep 1, 2018 at 1:38 PM Robert Vanden Eynde
wrote:
> What's the difference between you proposition and dataclasses ? Introduced
> in Python 3.7 ?
>
A named list would allow sequence operations such as iteration.
Dataclasses, IIUC, do not support sequence operations.
What's the difference between you proposition and dataclasses ? Introduced
in Python 3.7 ?
Le sam. 1 sept. 2018 à 19:33, Jonathan Goble a écrit :
> On Sat, Sep 1, 2018 at 1:08 PM Angus Hollands wrote:
>
>> As to the other questions, yes, do we need another module in the standard
>> library?
>>
On Sat, Sep 1, 2018 at 1:08 PM Angus Hollands wrote:
> As to the other questions, yes, do we need another module in the standard
> library?
>
Wouldn't need a new module. This would be a perfect fit for the existing
collections module where namedtuple already resides.
I Googled "pypi
>
> From: "Steven D'Aprano"
> To: python-ideas@python.org
> Cc:
> Bcc:
> Date: Sat, 1 Sep 2018 18:25:21 +1000
> Subject: Re: [Python-ideas] Add recordlcass to collections module
> On Sat, Sep 01, 2018 at 09:47:04AM +0200, Martin Bammer wrote:
> > H
Hi Martin
Summary: Thank you. Your suggestion has good points. I suggest to
advance it (i) provide a pure Python implementation of namedlist, and
(ii) ask that the Python docs for namedtuple provide a link to
namedlist.
Thank you, Martin, for bringing
On Sat, Sep 01, 2018 at 09:47:04AM +0200, Martin Bammer wrote:
> Hi,
>
> what about adding recordclass
> (https://bitbucket.org/intellimath/recordclass) to the collections module
The first thing you need to do is ask the author of that library whether
or not he or she is willing to donate the
Hi,
what about adding recordclass
(https://bitbucket.org/intellimath/recordclass) to the collections module
It is like namedtuple, but elements are writable and it is written in C
and thus much faster.
And for convenience it could be named as namedlist.
Regards,
Martin
25 matches
Mail list logo