scratch-syntax 0.3.0__tar.gz → 0.3.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scratch_syntax
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: A syntax library designed to help scratch users transition to python
5
5
  Author-email: Cade <cadey.matignas@gmail.com>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -46,4 +46,5 @@ pip install --upgrade scratch_syntax
46
46
  # All Functions
47
47
 
48
48
  ```bash
49
- say(), ask(), wait(), pick_random_number_from(), stop_all(), add_to_list(), insert_in_list(), delete_from_list(), delete_all_from_list(), replace_from_list()
49
+ say(), ask(), wait(), pick_random_number_from(), stop_all(), add_to_list(), insert_in_list(), delete_from_list(), delete_all_from_list(), replace_from_list(), answer()
50
+ ```
@@ -33,4 +33,5 @@ pip install --upgrade scratch_syntax
33
33
  # All Functions
34
34
 
35
35
  ```bash
36
- say(), ask(), wait(), pick_random_number_from(), stop_all(), add_to_list(), insert_in_list(), delete_from_list(), delete_all_from_list(), replace_from_list()
36
+ say(), ask(), wait(), pick_random_number_from(), stop_all(), add_to_list(), insert_in_list(), delete_from_list(), delete_all_from_list(), replace_from_list(), answer()
37
+ ```
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "scratch_syntax"
7
- version = "0.3.0"
7
+ version = "0.3.1"
8
8
  authors = [
9
9
  { name="Cade", email="cadey.matignas@gmail.com" },
10
10
  ]
@@ -2,7 +2,7 @@ import sys
2
2
  from random import randint
3
3
  from time import sleep
4
4
 
5
- answer = ""
5
+ _scratch_data = {"answer": ""}
6
6
 
7
7
 
8
8
  def say(text):
@@ -10,9 +10,12 @@ def say(text):
10
10
 
11
11
 
12
12
  def ask(question):
13
- global answer
14
- answer = input(question)
15
- return answer
13
+ _scratch_data["answer"] = input(question)
14
+ return _scratch_data["answer"]
15
+
16
+
17
+ def answer():
18
+ return _scratch_data["answer"]
16
19
 
17
20
 
18
21
  def wait(seconds):
@@ -36,7 +39,7 @@ def insert_in_list(listname, index, item):
36
39
 
37
40
 
38
41
  def delete_from_list(listname, index):
39
- del listname[index]
42
+ listname.pop(index)
40
43
 
41
44
 
42
45
  def delete_all_from_list(listname):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scratch_syntax
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: A syntax library designed to help scratch users transition to python
5
5
  Author-email: Cade <cadey.matignas@gmail.com>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -46,4 +46,5 @@ pip install --upgrade scratch_syntax
46
46
  # All Functions
47
47
 
48
48
  ```bash
49
- say(), ask(), wait(), pick_random_number_from(), stop_all(), add_to_list(), insert_in_list(), delete_from_list(), delete_all_from_list(), replace_from_list()
49
+ say(), ask(), wait(), pick_random_number_from(), stop_all(), add_to_list(), insert_in_list(), delete_from_list(), delete_all_from_list(), replace_from_list(), answer()
50
+ ```
File without changes
File without changes