-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Add SynchronizedBase to __all__ #110304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add SynchronizedBase to __all__ #110304
Conversation
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Reviewers: I didn't think this needed a GH Issue # b/c it's such a small change. I'm fine with exporting a different class, or masking this differently, but - to me - this seems like something that's obviously necessary. If this shouldn't go in, I'm fine with it not going in. |
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>
18ba3f0
to
b58403e
Compare
Boop. |
# Methods for getting synchronization wrappers | ||
'Value', 'Array', | ||
# The synchronization types | ||
'Synchronized', 'SynchronizedArray', 'SynchronizedString', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are not documented and therefore not properly public, why should they be added 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 classand was very confused when
mypy
threw an erroron that line. I dropped into the interpreter and
tried to use the
help
function to find thereturn type of
Value
- and failed. I droppedinto the code and found that the type returned
from the
Value
function was not exported fromthe 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.