[issue44768] dataclasses.dataclass and collections.namedtuple do the same thing

2021-07-28 Thread pavel-lexyr
pavel-lexyr added the comment: Thank you all for your input! Migrating the discussion to https://mail.python.org/archives/list/python-id...@python.org/thread/UQRCDWMFNC5NRLLQCTYPOEGWJOIV7BGJ/ for now, if anyone wants to continue. -- resolution: rejected

[issue44768] dataclasses.dataclass and collections.namedtuple do the same thing

2021-07-28 Thread pavel-lexyr
Change by pavel-lexyr : -- resolution: -> rejected ___ Python tracker <https://bugs.python.org/issue44768> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue44768] dataclasses.dataclass and collections.namedtuple do the same thing

2021-07-28 Thread pavel-lexyr
Change by pavel-lexyr : -- versions: -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue44

[issue44768] dataclasses.dataclass and collections.namedtuple do the same thing

2021-07-28 Thread pavel-lexyr
pavel-lexyr added the comment: Touche. Another advantage a namedtuple has is that it can expand out of the box - i.e., can write something like > for x, y, z in namedtuple_list: without any list comprehensions. Can we bring those advantages into the dataclass while also preserving

[issue44768] dataclasses.dataclass and collections.namedtuple do the same thing

2021-07-28 Thread pavel-lexyr
pavel-lexyr added the comment: Most of the differences are direct upgrades added in the dataclass module. Deprecating dataclass in favour of nametuple would be counterproductive, I agree - what about vice versa? -- ___ Python tracker <ht

[issue44765] Misspelled Word In Docs

2021-07-28 Thread pavel-lexyr
Change by pavel-lexyr : -- keywords: +patch nosy: +pavel-lexyr nosy_count: 3.0 -> 4.0 pull_requests: +25959 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/27430 ___ Python tracker <https://bugs.p

[issue44768] dataclasses.dataclass and collections.namedtuple do the same thing

2021-07-28 Thread pavel-lexyr
New submission from pavel-lexyr : PEP 20 states: > There should be one-- and preferably only one --obvious way to do it. As of right now, two very similar constructions for making a lightweight dataclass exist in Python. collections.namedtuple is one of them. dataclasses.dataclass is

[issue44571] itertools: takedowhile()

2021-07-12 Thread pavel-lexyr
pavel-lexyr added the comment: Thank you - that answers the questions. The use case where we would want to know if the last element is transitional or not completely slipped my mind for some reason. -- ___ Python tracker <https://bugs.python.

[issue44571] itertools: takedowhile()

2021-07-12 Thread pavel-lexyr
pavel-lexyr added the comment: There is a core part of the `takedowhile` proposal's use case that I am having trouble envisioning via the alternative `before_and_after` proposal. If the `after` part of the iterator the user does not engage with, the transitional elements will be

[issue44571] itertools: takedowhile()

2021-07-05 Thread pavel-lexyr
pavel-lexyr added the comment: I see. If the syntax allows for better ways to do it now, perhaps a move towards deprecation would be a better idea then? This would agree with the Zen. Also, please elaborate more on the generator-based solutions you have in mind. The suggestion stems from a

[issue44571] itertools: takedowhile()

2021-07-05 Thread pavel-lexyr
New submission from pavel-lexyr : As described in the documentation, itertools.takewhile() returns all the elements until the first one that does not match the provided criterion. In case of a destructive iterator, or one with side effects, not yielding an element downstream may render

[issue44528] Move IP version resolving to http.server's API

2021-06-28 Thread pavel-lexyr
New submission from pavel-lexyr : Python's native HTTP server (http.server module) has special code to allow it to detect and bind to IPv6 addresses when called as a CLI tool. As of right now, the code is in private functions. Those are not intended to be called by library users - onl