[issue17765] weakref.ref ignores a 'callback' keyword argument
Mark Dickinson
report at bugs.python.org
Tue Apr 16 21:11:10 CEST 2013
New submission from Mark Dickinson:
Passing a weakref.ref callback by keyword currently fails silently:
Python 3.4.0a0 (default:537c1f1ab53c, Apr 16 2013, 20:07:47)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import weakref
>>> weakref.ref({1, 2, 3}, callback=lambda ref:print("collected"))
<weakref at 0x1006189d8; dead>
For Python 3.4, I'd suggest that either (1) this should be an exception, or (2) it should be permissible to pass the callback by keyword.
----------
messages: 187115
nosy: mark.dickinson
priority: normal
severity: normal
stage: needs patch
status: open
title: weakref.ref ignores a 'callback' keyword argument
type: enhancement
versions: Python 3.4
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17765>
_______________________________________
More information about the Python-bugs-list
mailing list