Re: [Python-ideas] Revisiting Immutable Mappings

2018-10-16 Thread Zaur Shibzukhov
вторник, 16 октября 2018 г., 12:29:55 UTC+3 пользователь Steven D'Aprano написал: > > > > It seems to me that we would need this restriction to make a reasonably > > universal frozendict that is, itself, hashable. > > When people talk about frozendicts being hashable, they mean it in the > sa

Re: [Python-ideas] Revisiting Immutable Mappings

2018-10-11 Thread Zaur Shibzukhov
May be the following simple prototype of frozendict could be useful? def frozen_error(): return RuntimeError("frozendict is not mutable") class frozendict(dict): # def __setitem__(self, key, val): raise frozen_error() # def setdefault(self, key, val=None): rais

Re: [Python-ideas] Retire or reword the "Beautiful is better than ugly" Zen clause

2018-09-14 Thread Zaur Shibzukhov
пятница, 14 сентября 2018 г., 1:56:58 UTC+3 пользователь Guido van Rossum написал: > > Everyone who still wants to reply to this thread: please decide for > yourself whether the OP, "Samantha Quan" who started it could be a Russian > troll. Facts to consider: (a) the OP's address is ...@yandex

Re: [Python-ideas] Add recordlcass to collections module

2018-09-04 Thread Zaur Shibzukhov
--- *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 va

Re: [Python-ideas] Add recordlcass to collections module

2018-09-03 Thread Zaur Shibzukhov
понедельник, 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`), >

Re: [Python-ideas] Add recordlcass to collections module

2018-09-02 Thread Zaur Shibzukhov
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