swizzle 2.3.1__tar.gz → 2.3.2__tar.gz
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.
- {swizzle-2.3.1/swizzle.egg-info → swizzle-2.3.2}/PKG-INFO +1 -1
- {swizzle-2.3.1 → swizzle-2.3.2}/swizzle/__init__.py +5 -1
- {swizzle-2.3.1 → swizzle-2.3.2}/swizzle/trie.py +0 -11
- {swizzle-2.3.1 → swizzle-2.3.2/swizzle.egg-info}/PKG-INFO +1 -1
- {swizzle-2.3.1 → swizzle-2.3.2}/LICENSE +0 -0
- {swizzle-2.3.1 → swizzle-2.3.2}/README.md +0 -0
- {swizzle-2.3.1 → swizzle-2.3.2}/setup.cfg +0 -0
- {swizzle-2.3.1 → swizzle-2.3.2}/setup.py +0 -0
- {swizzle-2.3.1 → swizzle-2.3.2}/swizzle.egg-info/SOURCES.txt +0 -0
- {swizzle-2.3.1 → swizzle-2.3.2}/swizzle.egg-info/dependency_links.txt +0 -0
- {swizzle-2.3.1 → swizzle-2.3.2}/swizzle.egg-info/top_level.txt +0 -0
@@ -18,7 +18,7 @@ except ImportError:
|
|
18
18
|
|
19
19
|
_type = builtins.type
|
20
20
|
|
21
|
-
__version__ = "2.3.
|
21
|
+
__version__ = "2.3.2"
|
22
22
|
|
23
23
|
MISSING = object()
|
24
24
|
|
@@ -535,6 +535,10 @@ def swizzle(cls=None, meta=False, sep=None, type=tuple, only_attrs=None):
|
|
535
535
|
return class_decorator(cls)
|
536
536
|
|
537
537
|
|
538
|
+
t = swizzledtuple
|
539
|
+
# c = swizzledclass
|
540
|
+
|
541
|
+
|
538
542
|
class Swizzle(types.ModuleType):
|
539
543
|
def __init__(self):
|
540
544
|
types.ModuleType.__init__(self, __name__)
|
@@ -48,14 +48,3 @@ class Trie:
|
|
48
48
|
result.append(query[i:longest_end])
|
49
49
|
i = longest_end
|
50
50
|
return result
|
51
|
-
|
52
|
-
|
53
|
-
if __name__ == "__main__":
|
54
|
-
words = ["mango", "man", "go", "bat", "manbat"]
|
55
|
-
trie = Trie(words)
|
56
|
-
|
57
|
-
print(trie.split_longest_prefix("mangomanmanbat")) # ['mango', 'man', 'bat']
|
58
|
-
print(trie.split_longest_prefix("manbat")) # ['manbat']
|
59
|
-
print(trie.split_longest_prefix("mango")) # ['mango']
|
60
|
-
print(trie.split_longest_prefix("mangoman")) # ['mango', 'man']
|
61
|
-
print(trie.split_longest_prefix("unknownword")) # None
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|