xloft 0.1.2__py3-none-any.whl → 0.1.4__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.2
3
+ Version: 0.1.4
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"
@@ -108,6 +107,8 @@ nt.update("x", 20)
108
107
  nt.update("y", "Hi")
109
108
  nt["x"] # => 20
110
109
  nt["y"] # => "Hi"
110
+ nt.update("z", [1, 2, 3])
111
+ nt.z # => [1, 2, 3]
111
112
 
112
113
  d = nt.to_dict()
113
114
  d["x"] # => 10
@@ -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.4.dist-info/METADATA,sha256=KpM1_BB1kjid77XXBTQfm6BUVTDnfSluSAuxgma0eXg,5339
6
+ xloft-0.1.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
+ xloft-0.1.4.dist-info/licenses/LICENSE,sha256=2zZINd6m_jNYlowdQImlEizyhSui5cBAJZRhWQURcEc,1095
8
+ xloft-0.1.4.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.2.dist-info/METADATA,sha256=ynlRaMkUarjt_XwNF515bTMIptkfJhffGNBuehDzy60,5301
6
- xloft-0.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
- xloft-0.1.2.dist-info/licenses/LICENSE,sha256=2zZINd6m_jNYlowdQImlEizyhSui5cBAJZRhWQURcEc,1095
8
- xloft-0.1.2.dist-info/RECORD,,
File without changes