xloft 0.1.3__py3-none-any.whl → 0.1.5__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 xloft might be problematic. Click here for more details.

xloft/namedtuple.py CHANGED
@@ -20,17 +20,13 @@ class NamedTuple:
20
20
  return self.__dict__[name]
21
21
 
22
22
  def __setattr__(self, name: str, value: Any) -> None:
23
- """Setter."""
23
+ """Fail Setter."""
24
24
  raise AttributeDoesNotSetValue(name)
25
25
 
26
26
  def __delattr__(self, name: str) -> None:
27
- """Deleter."""
27
+ """Fail Deleter."""
28
28
  raise AttributeCannotBeDelete(name)
29
29
 
30
- def __getitem__(self, key: str) -> Any:
31
- """Access by name of key."""
32
- return self.__dict__[key]
33
-
34
30
  def get(self, key: str, default: Any | None = None) -> Any | None:
35
31
  """Return the value for key if key is in the dictionary, else default."""
36
32
  value = self.__dict__.get(key)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xloft
3
- Version: 0.1.3
3
+ Version: 0.1.5
4
4
  Summary: (XLOFT) X-Library of tools
5
5
  Project-URL: Homepage, https://github.com/kebasyaty/xloft
6
6
  Project-URL: Repository, https://github.com/kebasyaty/xloft
@@ -91,9 +91,8 @@ nt.x # => 10
91
91
  nt.y # => "Hello"
92
92
  nt.z # => raise: KeyError
93
93
 
94
- nt["x"] # => 10
95
- nt["y"] # => "Hello"
96
- nt["z"] # => raise: KeyError
94
+ nt["x"] # => raise: KeyError
95
+ nt["y"] # => raise: KeyError
97
96
 
98
97
  nt.get("x") # => 10
99
98
  nt.get("y") # => "Hello"
@@ -106,8 +105,8 @@ nt.z = [1, 2, 3] # => raise: AttributeDoesNotSetValue
106
105
 
107
106
  nt.update("x", 20)
108
107
  nt.update("y", "Hi")
109
- nt["x"] # => 20
110
- nt["y"] # => "Hi"
108
+ nt.x # => 20
109
+ nt.y # => "Hi"
111
110
  nt.update("z", [1, 2, 3])
112
111
  nt.z # => [1, 2, 3]
113
112
 
@@ -0,0 +1,8 @@
1
+ xloft/__init__.py,sha256=yV847dKh9ROtw1fX5NHvPaHN-9cHYOfu9URQ--OVKXw,107
2
+ xloft/errors.py,sha256=GYXvi2l01VUDQSs6skiOfQsKLF6tFuUhJMqNkL7BJNI,857
3
+ xloft/namedtuple.py,sha256=05XP8vgA9_AuSyQyx2G4Wbbf2ZiPffNBjtB-w_VDAe0,1612
4
+ xloft/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ xloft-0.1.5.dist-info/METADATA,sha256=i5pYt6789F3R_SS-5oHra7G_0QQWXvwIN58CeMKAgzo,5333
6
+ xloft-0.1.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
+ xloft-0.1.5.dist-info/licenses/LICENSE,sha256=2zZINd6m_jNYlowdQImlEizyhSui5cBAJZRhWQURcEc,1095
8
+ xloft-0.1.5.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- xloft/__init__.py,sha256=yV847dKh9ROtw1fX5NHvPaHN-9cHYOfu9URQ--OVKXw,107
2
- xloft/errors.py,sha256=GYXvi2l01VUDQSs6skiOfQsKLF6tFuUhJMqNkL7BJNI,857
3
- xloft/namedtuple.py,sha256=ZOeVgj3gCN0a9XPrOwcd2UVfUUXTj88Uw6Rlx8sh2TQ,1723
4
- xloft/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- xloft-0.1.3.dist-info/METADATA,sha256=eufsI-QnEfPaqIfkzjrQClfjRukUH5tNN69RAs8C8vI,5348
6
- xloft-0.1.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
- xloft-0.1.3.dist-info/licenses/LICENSE,sha256=2zZINd6m_jNYlowdQImlEizyhSui5cBAJZRhWQURcEc,1095
8
- xloft-0.1.3.dist-info/RECORD,,
File without changes