diff options
author | Arie Bovenberg <a.c.bovenberg@gmail.com> | 2022-01-22 10:10:11 +0100 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2022-03-13 12:05:41 +0100 |
commit | 3b31182ed21415503e1950dff2be998e9852382b (patch) | |
tree | 1636194755b01fe86c4904f900ddaa1aa8e3eb6e /doc/intro.rst | |
parent | 6391b1a03682c3493ea69c5a9698277ba9d53a9c (diff) | |
download | rsa-git-3b31182ed21415503e1950dff2be998e9852382b.tar.gz |
Remove overlapping slots from AbstractKey subclasses
`PublicKey` and `PrivateKey` both define the `n` and `e` slots, which
are already present in their base class. This reduces the benefits of
having slots.
```shell
$ slotscheck -m rsa -v
ERROR: 'rsa.key:PrivateKey' defines overlapping slots.
- e (rsa.key:AbstractKey)
- n (rsa.key:AbstractKey)
ERROR: 'rsa.key:PublicKey' defines overlapping slots.
- e (rsa.key:AbstractKey)
- n (rsa.key:AbstractKey)
```
The Python docs say:
> If a class defines a slot also defined in a base class, the instance
> variable defined by the base class slot is inaccessible (except by
> retrieving its descriptor directly from the base class). This renders
> the meaning of the program undefined.
Diffstat (limited to 'doc/intro.rst')
0 files changed, 0 insertions, 0 deletions