Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
It is still valid:
class MyLocal(local):
...def __init__(self, *args, **kwargs):
...self.args = args
...self.kwargs = kwargs
...
MyLocal(1)
This works when local is thread._local (from thread import _local as
Tony Nelson tony_nel...@users.sourceforge.net added the comment:
Thanks, Amaury. The new test works here on Python2.6.1, failing without
the fix and passing with it. (Passing MyLocal(a=1) and failing
MyLocal(1), as expected.) With the fix, _threading_local.py supports
positional arguments to
Guido van Rossum gu...@python.org added the comment:
Looks good to me. Amaury, can you make sure this lands in 2.6, 2.7, 3.0
and 3.1?
--
assignee: - amaury.forgeotdarc
nosy: +gvanrossum
resolution: - accepted
___
Python tracker