diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-11-07 10:16:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-07 10:16:54 (GMT) |
commit | ea2316a220ea5ae5646518e3855ef22b9c84d64d (patch) | |
tree | e1178ba32c93422d2ae696ef638a092bfdcd15d5 /Lib/statistics.py | |
parent | 1b5a62b88afd97475db7c4de72e65c08dd65d887 (diff) | |
download | cpython-ea2316a220ea5ae5646518e3855ef22b9c84d64d.zip cpython-ea2316a220ea5ae5646518e3855ef22b9c84d64d.tar.gz cpython-ea2316a220ea5ae5646518e3855ef22b9c84d64d.tar.bz2 |
[3.10] [ GH-99155: Fix `NormalDist` pickle with `0` and `1` protocols (GH-99156). (GH-99188) (GH-99190)
Diffstat (limited to 'Lib/statistics.py')
-rw-r--r-- | Lib/statistics.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/statistics.py b/Lib/statistics.py index f662453..52f1785 100644 --- a/Lib/statistics.py +++ b/Lib/statistics.py @@ -1265,3 +1265,9 @@ class NormalDist: def __repr__(self): return f'{type(self).__name__}(mu={self._mu!r}, sigma={self._sigma!r})' + + def __getstate__(self): + return self._mu, self._sigma + + def __setstate__(self, state): + self._mu, self._sigma = state |