Re: Dataclasses, immutability(?), and ChatGPT

2023-04-12 Thread Thomas Passin
On 4/12/2023 12:58 AM, dn via Python-list wrote: Are dataclasses (or instances thereof) mutable or immutable? - and in what sense? Have been experimenting with ChatGPT. In particular: its possibilities as a trainer, good ideas for methods of introducing new topics, its capability for drawing-

Re: Dataclasses, immutability(?), and ChatGPT

2023-04-12 Thread Grant Edwards
On 2023-04-12, Roel Schroeven wrote: >> Huh? If we'd been discussing namedtuples over (say) dictionaries, I'd >> perhaps have accepted the reply. > > ChatGPT is wrong. > >> Anything I've 'missed'? >> - or a salutary tale of not depending upon ChatGPT etc? > You didn't miss anything, ChatGPT is

Re: Dataclasses, immutability(?), and ChatGPT

2023-04-12 Thread Roel Schroeven
Op 12/04/2023 om 6:58 schreef dn via Python-list: Are dataclasses (or instances thereof) mutable or immutable? - and in what sense? Instances of dataclasses are mutable, just like normal classes. Dataclasses *are* normal classes, with some extra special methods. They are totally different from

Dataclasses, immutability(?), and ChatGPT

2023-04-11 Thread dn via Python-list
Are dataclasses (or instances thereof) mutable or immutable? - and in what sense? Have been experimenting with ChatGPT. In particular: its possibilities as a trainer, good ideas for methods of introducing new topics, its capability for drawing-up demonstrations or examples, its interpretation