You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
apply_to_collections raises for defaultdict inputs #529
apply_to_collections raises TypeError: first argument must be callable or None when the first collection is a standard-library defaultdict, even when both inputs have identical keys. The corresponding plain-dictionary operation succeeds.
This fails with TypeError: first argument must be callable or None. Using None or list as the factory also fails.
Expected behavior
Return a defaultdict containing {"count": 5} and preserve the first input's default_factory, as the single-collection helper already does.
Additional context
Reproduced from current main 9a53be868a1cda6349f5daf5112e80c6143635f6 on Windows with Python 3.12.14. This reproducer uses only standard-library values; PyTorch and CUDA are not required.
Activity