Show More
@@ -47,16 +47,29 b' except ModuleNotFoundError:' | |||
|
47 | 47 | def __init__(self, path): |
|
48 | 48 | pass |
|
49 | 49 | |
|
50 | def get(self, key, default): | |
|
50 | def get(self, key, default=None): | |
|
51 | 51 | warn( |
|
52 | f"using {key} requires you to install the `pickleshare` library.", | |
|
52 | f"This is now an optional IPython functionality, using {key} requires you to install the `pickleshare` library.", | |
|
53 | 53 | stacklevel=2, |
|
54 | 54 | ) |
|
55 | 55 | return default |
|
56 | 56 | |
|
57 | def __getitem__(self, key): | |
|
58 | warn( | |
|
59 | f"This is now an optional IPython functionality, using {key} requires you to install the `pickleshare` library.", | |
|
60 | stacklevel=2, | |
|
61 | ) | |
|
62 | return None | |
|
63 | ||
|
57 | 64 | def __setitem__(self, key, value): |
|
58 | 65 | warn( |
|
59 | f"using {key} requires you to install the `pickleshare` library.", | |
|
66 | f"This is now an optional IPython functionality, setting {key} requires you to install the `pickleshare` library.", | |
|
67 | stacklevel=2, | |
|
68 | ) | |
|
69 | ||
|
70 | def __delitem__(self, key): | |
|
71 | warn( | |
|
72 | f"This is now an optional IPython functionality, deleting {key} requires you to install the `pickleshare` library.", | |
|
60 | 73 | stacklevel=2, |
|
61 | 74 | ) |
|
62 | 75 |
General Comments 0
You need to be logged in to leave comments.
Login now