Skip to content

Commit c2142aa

Browse files
Add SynchronizedBase to __all__
Recently I was writing some heavily-parallel code, and I tried to type-check with `mypy`. I (naively) thought that `multiprocessing.Value` was a class and was very confused when `mypy` threw an error on that line. I dropped into the interpreter and tried to use the `help` function to find the return type of `Value` - and failed. I dropped into the code and found that the type returned from the `Value` function was not exported from the module. I want types in Python to be _awesome_. I think `mypy` is a step in the right direction for that. This change is me doing my part to expose more types so `mypy` can become as good as it can be. distortedsignal<distortedsignal@gmail.com>
1 parent 625ecbe commit c2142aa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/multiprocessing/sharedctypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from .context import reduction, assert_spawning
1717
_ForkingPickler = reduction.ForkingPickler
1818

19-
__all__ = ['RawValue', 'RawArray', 'Value', 'Array', 'copy', 'synchronized']
19+
__all__ = ['RawValue', 'RawArray', 'Value', 'Array', 'copy', 'synchronized', 'SynchronizedBase']
2020

2121
#
2222
#

0 commit comments

Comments
 (0)