persidict 0.2.1__py3-none-any.whl → 0.2.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of persidict might be problematic. Click here for more details.

persidict/persi_dict.py CHANGED
@@ -29,11 +29,11 @@ from .safe_str_tuple import SafeStrTuple
29
29
  PersiDictKey = Union[SafeStrTuple, Sequence[str], str]
30
30
  """ A value which can be used as a key for PersiDict.
31
31
 
32
- PersiDict-s accept keys on a form ofSafeStrTuple,
32
+ PersiDict-s accept keys on a form of SafeStrTuple,
33
33
  or a string, or a sequence of strings.
34
34
  The characters within strings must be URL/filename-safe.
35
35
  If a string (or a sequence of strings) is passed to a PersiDict as a key,
36
- it will be automatically converted to SafeStrTuple.
36
+ it will be automatically converted into SafeStrTuple.
37
37
  """
38
38
 
39
39
  class PersiDict(MutableMapping):
@@ -215,10 +215,10 @@ class PersiDict(MutableMapping):
215
215
 
216
216
  key = SafeStrTuple(key)
217
217
 
218
- try:
219
- self.__delitem__(key)
218
+ if key in self:
219
+ del self[key]
220
220
  return True
221
- except:
221
+ else:
222
222
  return False
223
223
 
224
224
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: persidict
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Simple persistent key-value store for Python. Values are stored as files on a disk or as S3 objects on AWS cloud.
5
5
  Home-page: https://github.com/vladlpavlov/persidict
6
6
  Author: Vlad (Volodymyr) Pavlov
@@ -1,11 +1,11 @@
1
1
  persidict/__init__.py,sha256=bSOkH1e2bJuN4iFy2H4w6E3kmeODl0e7x3pUHExl_Uk,1030
2
2
  persidict/file_dir_dict.py,sha256=-MYpUFK2ysPcrNz-gmJZOQeU18lJqlkDSI54IBSHOoA,9048
3
- persidict/persi_dict.py,sha256=fxeRtMp0Nv4-P5XnB3x7Nqjrj1-F07ot-sH857UNnp0,7904
3
+ persidict/persi_dict.py,sha256=0waP8_soZ_msw_HfmxaaC8ZIPCPqhQnReMHLz706F5o,7908
4
4
  persidict/s3_dict.py,sha256=0bVKxCdLcYVSfPeFrsqST2CE2-KQ1WpiOaLlu2WDgTc,9389
5
5
  persidict/safe_str_tuple.py,sha256=Tia4O69QIn-htCM_WKQx_SyMNwOhLXrWcDlBRseCC2E,3547
6
6
  persidict/safe_str_tuple_signing.py,sha256=OvGyaNOhx_I518nTifz3sRbej-vxtuRWqd4w1aEp8FY,3743
7
- persidict-0.2.1.dist-info/LICENSE,sha256=oWpRWnm32aM5jVoboapPqgHi-drh1OPeZrrafyE1zTs,1113
8
- persidict-0.2.1.dist-info/METADATA,sha256=ebnnT3NSp8dj9yCD4VSZmqRlS_Dnz5bpAUzRt1T94L0,7834
9
- persidict-0.2.1.dist-info/WHEEL,sha256=5sUXSg9e4bi7lTLOHcm6QEYwO5TIF1TNbTSVFVjcJcc,92
10
- persidict-0.2.1.dist-info/top_level.txt,sha256=7Kr8wnF-PGd513PbAORWUpp7Bi09VIZVTQS7ZN-dJXc,10
11
- persidict-0.2.1.dist-info/RECORD,,
7
+ persidict-0.2.2.dist-info/LICENSE,sha256=oWpRWnm32aM5jVoboapPqgHi-drh1OPeZrrafyE1zTs,1113
8
+ persidict-0.2.2.dist-info/METADATA,sha256=_JQTDQtrXu9JmS5K3yzz5t1y1p8VJEghoB9pVGe9WK4,7834
9
+ persidict-0.2.2.dist-info/WHEEL,sha256=5sUXSg9e4bi7lTLOHcm6QEYwO5TIF1TNbTSVFVjcJcc,92
10
+ persidict-0.2.2.dist-info/top_level.txt,sha256=7Kr8wnF-PGd513PbAORWUpp7Bi09VIZVTQS7ZN-dJXc,10
11
+ persidict-0.2.2.dist-info/RECORD,,