dshellInterpreter 0.2.15.0__py3-none-any.whl → 0.2.15.1__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 dshellInterpreter might be problematic. Click here for more details.
- Dshell/_DshellParser/ast_nodes.py +48 -0
- {dshellinterpreter-0.2.15.0.dist-info → dshellinterpreter-0.2.15.1.dist-info}/METADATA +1 -1
- {dshellinterpreter-0.2.15.0.dist-info → dshellinterpreter-0.2.15.1.dist-info}/RECORD +6 -6
- {dshellinterpreter-0.2.15.0.dist-info → dshellinterpreter-0.2.15.1.dist-info}/WHEEL +0 -0
- {dshellinterpreter-0.2.15.0.dist-info → dshellinterpreter-0.2.15.1.dist-info}/licenses/LICENSE +0 -0
- {dshellinterpreter-0.2.15.0.dist-info → dshellinterpreter-0.2.15.1.dist-info}/top_level.txt +0 -0
|
@@ -586,6 +586,54 @@ class ListNode(ASTNode):
|
|
|
586
586
|
if number < 1:
|
|
587
587
|
raise Exception(f"The number of elements to remove must be at least 1, not {number} !")
|
|
588
588
|
|
|
589
|
+
count = 0
|
|
590
|
+
while number > 0 and count < self.len_iterable:
|
|
591
|
+
if self.iterable[count] == value:
|
|
592
|
+
self.iterable.pop(count)
|
|
593
|
+
self.len_iterable -= 1
|
|
594
|
+
number -= 1
|
|
595
|
+
continue
|
|
596
|
+
count += 1
|
|
597
|
+
|
|
598
|
+
def pop(self):
|
|
599
|
+
"""
|
|
600
|
+
Remove and return the last element of the list.
|
|
601
|
+
:return: The last element of the list.
|
|
602
|
+
"""
|
|
603
|
+
if self.len_iterable == 0:
|
|
604
|
+
raise IndexError("pop from empty list")
|
|
605
|
+
|
|
606
|
+
self.len_iterable -= 1
|
|
607
|
+
return self.iterable.pop()
|
|
608
|
+
|
|
609
|
+
def count(self):
|
|
610
|
+
"""
|
|
611
|
+
Return the number of elements in the list.
|
|
612
|
+
:return: The number of elements in the list.
|
|
613
|
+
"""
|
|
614
|
+
return self.len_iterable
|
|
615
|
+
|
|
616
|
+
def clear(self):
|
|
617
|
+
"""
|
|
618
|
+
Clear the list.
|
|
619
|
+
"""
|
|
620
|
+
self.iterable = []
|
|
621
|
+
self.len_iterable = 0
|
|
622
|
+
self.iterateur_count = 0
|
|
623
|
+
|
|
624
|
+
def sort(self, reverse: bool = False):
|
|
625
|
+
"""
|
|
626
|
+
Sort the list.
|
|
627
|
+
:param reverse: Whether to sort the list in reverse order.
|
|
628
|
+
"""
|
|
629
|
+
self.iterable.sort(reverse=reverse)
|
|
630
|
+
|
|
631
|
+
def reverse(self):
|
|
632
|
+
"""
|
|
633
|
+
Reverse the list.
|
|
634
|
+
"""
|
|
635
|
+
self.iterable.reverse()
|
|
636
|
+
|
|
589
637
|
def __add__(self, other: "ListNode"):
|
|
590
638
|
"""
|
|
591
639
|
Add another ListNode to this one.
|
|
@@ -13,14 +13,14 @@ Dshell/DISCORD_COMMANDS/utils/utils_thread.py,sha256=tVl4msEwrWHY-0AytI6eY3JSs-e
|
|
|
13
13
|
Dshell/_DshellInterpreteur/__init__.py,sha256=xy5-J-R3YmY99JF3NBHTRRLsComFxpjnCA5xacISctU,35
|
|
14
14
|
Dshell/_DshellInterpreteur/dshell_interpreter.py,sha256=dxXhKGCQR8dKSuMRXlWyuBT_ufETdeUao29jNZD-ci4,32429
|
|
15
15
|
Dshell/_DshellParser/__init__.py,sha256=ONDfhZMvClqP_6tE8SLjp-cf3pXL-auQYnfYRrHZxC4,56
|
|
16
|
-
Dshell/_DshellParser/ast_nodes.py,sha256=
|
|
16
|
+
Dshell/_DshellParser/ast_nodes.py,sha256=X7kw5nflGCi_h4FWlK5vytedR70Mwarj5NbhpaqYao4,19643
|
|
17
17
|
Dshell/_DshellParser/dshell_parser.py,sha256=YUFfBbFQ1ApOCyVhx-0nJ6S6W5MOBG6YabbkM43BKVw,21708
|
|
18
18
|
Dshell/_DshellTokenizer/__init__.py,sha256=LIQSRhDx2B9pmPx5ADMwwD0Xr9ybneVLhHH8qrJWw_s,172
|
|
19
19
|
Dshell/_DshellTokenizer/dshell_keywords.py,sha256=7oeSKLXCsPRpyU31skCerOUMzd2cdm-GwofpmgTPkD0,5961
|
|
20
20
|
Dshell/_DshellTokenizer/dshell_token_type.py,sha256=gYIb2XN2YcgeRgmar_rBDS5CGmwfmxihu8mOW_d6lbE,1533
|
|
21
21
|
Dshell/_DshellTokenizer/dshell_tokenizer.py,sha256=RrJA2XpcFH2vS6SnRIn5Own_uL5orIDvpq74t8xD3og,7350
|
|
22
|
-
dshellinterpreter-0.2.15.
|
|
23
|
-
dshellinterpreter-0.2.15.
|
|
24
|
-
dshellinterpreter-0.2.15.
|
|
25
|
-
dshellinterpreter-0.2.15.
|
|
26
|
-
dshellinterpreter-0.2.15.
|
|
22
|
+
dshellinterpreter-0.2.15.1.dist-info/licenses/LICENSE,sha256=lNgcw1_xb7QENAQi3uHGymaFtbs0RV-ihiCd7AoLQjA,1082
|
|
23
|
+
dshellinterpreter-0.2.15.1.dist-info/METADATA,sha256=JuTyfR1m1gavMPWd4OQZiacSGm7FrT9ivYiQ3jxO1Zk,1151
|
|
24
|
+
dshellinterpreter-0.2.15.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
25
|
+
dshellinterpreter-0.2.15.1.dist-info/top_level.txt,sha256=B4CMhtmchGwPQJLuqUy0GhRG-0cUGxKL4GqEbCiB_vE,7
|
|
26
|
+
dshellinterpreter-0.2.15.1.dist-info/RECORD,,
|
|
File without changes
|
{dshellinterpreter-0.2.15.0.dist-info → dshellinterpreter-0.2.15.1.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|