GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — `dataclasses.astuple` breaks on `DefaultDict` · Issue #98169 · python/cpython Closed Labels type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportThis is very similar to #79721 from dataclasses import dataclass, astuple from typing import DefaultDict, List from collections import defaultdict @dataclass class C: mp: DefaultDict[str, List] dd = defaultdict(list) dd["x"].append(12) c = C(mp=dd) d = astuple(c) # throws "TypeError: first argument must be callable or None" assert d == ({"x": [12]},) assert d[0] is not c.mp # make sure defaultdict is copied Basically applying the same fix for Your environment
Linked PRsActivity
MetadataMetadataAssigneesLabelstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |