[Python-Dev] Re: Should set objects maintain insertion order too?

2019-12-30 Thread pylang
A set was requested with preserved insertion order. Mathematically, such a structure relates more to an Oset (having order) than a Set. See relationships in the image below: [image: libo.png] Each of the mentioned structure types has a dedicated role. Python's sets work well and correlate with

[Python-Dev] Re: PEP 622: Structural Pattern Matching

2020-06-24 Thread pylang
Great timing! Last week I was trying to emulate a certain Rust example in Python. Rust has a way to implement families of classes without subclassing, which I think could be a great addition to Python someday. I'll explain below. Here is a Rust example (https://youtu.be/WDkv2cKOxx0?t=3795) that d