Steven D'Aprano <[email protected]> added the comment:
Works for me in Python 3.10.0 on Linux.
After running your code, I get shared_dict is a DictProxy:
>>> shared_dict
<DictProxy object, typeid 'get_dict' at 0x7f092ccd6530>
>>> list(shared_dict.items())
[('number', 0), ('text', 'Hello World')]
and shared_lock an AcquirerProxy object.
Please double-check that the code you posted is the actual code that is
failing, and copy and paste the full traceback you receive, not just a one-line
summary.
Even if the error is reproducible, I doubt that the cause is what you state in
the title of this issue:
BaseManager.register no longer supports lambda callable
Lambdas are just functions, they aren't a different type of callable. So the
register method cannot distinguish between a lambda argument written directly
in place, and a named def defined earlier then passed by name. So whatever
error might be happening on your system, I doubt it has anything to do with the
use of lambda syntax
----------
nosy: +steven.daprano
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue46871>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com