Skip to content

Commit 8a4f3b9

Browse files
JuanCJuanC
authored andcommitted
fixing issues with Python capital case on commands provided
1 parent 92134b1 commit 8a4f3b9

1 file changed

Lines changed: 27 additions & 27 deletions

File tree

README.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838

3939
Python# (Python sharp) module was created with the intention of adding EOP (event oriented programming) into Python in the most native feeling, easy syntax way possible.
4040

41-
EOP is a programming paradigm that allows execute actions (code) based on "occurrences" or events, this is really useful when you have to execute specific actions when something happens but you do not have the certainty when or how many times is going to happen.
41+
EOP is a programming paradigm that allows execute actions (code) based on "occurrences" or events, this is really useful when you have to execute specific actions when something happens but you do not have the certainty when or how many times is going to occur.
4242

43-
This module was thought to accomplish EOP with 2 objectives in mind:
43+
This module was designed to accomplish EOP with 2 objectives in mind:
4444

4545
1. Features should look and feel like native Python features.
4646
2. Implementation should be based in another famous EOP language to reduce the learning curve and improve user experience.
@@ -70,9 +70,9 @@ For objective 2, the module was architected thinking in how another EOP language
7070

7171
1. C# implements events as a collection of callbacks that will be executed in some point of time, this collection of functions are called **Delegates**, invoking(executing) the delegate will cause the execution of all functions(callables) in its collection.
7272

73-
2. delegates are not commonly exposed publicly, for security reasons. As the fields/attributes in a class have to be encapsulated, delegates as well, and the way to encapsulate them is with events. Fields/attributes are to properties as delegates are to events.
73+
2. delegates are not commonly exposed publicly, for security reasons. Just as fields/attributes in a class have to be encapsulated, so do delegates. The way to encapsulate them is with events. Fields/attributes are to properties as delegates are to events.
7474

75-
3. Properties encapsulate fields/attributes with 2 functions/methods called "get" and "set", which define the logic of how data should be GET and SET out of the object, in C# events encapsulate delegates with 2 functions as well called "add" and "remove", which define the logic of how functions/subscribers should be added or removed out of the delegate.
75+
3. Properties encapsulate fields/attributes using two methods: "get" and "set", which define the logic of how data should be GET and SET out of the object, in C# events encapsulate delegates with 2 methods as well called "add" and "remove", which define the logic of how functions/subscribers should be added or removed out of the delegate.
7676

7777

7878
## Installation
@@ -82,7 +82,7 @@ For objective 2, the module was architected thinking in how another EOP language
8282
- **Python**: Version 3.6 or higher
8383
- **pip**: Python package manager
8484

85-
To install `Python_sharp` you can follow either of the options listed:
85+
To install `python_sharp` you can follow either of the options listed:
8686

8787
### Disclaimer
8888

@@ -91,55 +91,55 @@ version 1.0.0 is only available through GitHub PyPI does not contain that versio
9191
### 1. Clone the Repository
9292
If you want to explore the source code, you can clone the repository:
9393
```bash
94-
git clone https://github.com/juanclopgar97/Python_sharp.git
95-
cd Python_sharp
94+
git clone https://github.com/juanclopgar97/python_sharp.git
95+
cd python_sharp
9696
```
9797

9898
### 2. Install the package directly from GitHub using pip:
9999

100100
```bash
101-
pip install git+https://github.com/juanclopgar97/Python_sharp.git
101+
pip install git+https://github.com/juanclopgar97/python_sharp.git
102102
```
103103

104104
from a specific branch/commit/version:
105105

106106
```bash
107-
pip install git+https://github.com/juanclopgar97/Python_sharp.git@<branch_or_commit_or_version>
107+
pip install git+https://github.com/juanclopgar97/python_sharp.git@<branch_or_commit_or_version>
108108
```
109109

110110
Example:
111111

112112
```bash
113-
pip install git+https://github.com/juanclopgar97/Python_sharp.git@v1.0.0
113+
pip install git+https://github.com/juanclopgar97/python_sharp.git@v1.0.0
114114
```
115115

116116
### 3. Install from PyPI
117117

118118
```bash
119-
pip install Python_sharp
119+
pip install python_sharp
120120
```
121121
or select your version
122122

123123
```bash
124-
pip install Python_sharp==<version>
124+
pip install python_sharp==<version>
125125
```
126126

127127
Example:
128128

129129
```bash
130-
pip install Python_sharp==1.0.1
130+
pip install python_sharp==1.0.1
131131
```
132132
Upgrade it:
133133

134134
```bash
135-
pip install Python-sharp --upgrade
135+
pip install python-sharp --upgrade
136136
```
137137

138138

139139
### Usage
140140

141141
```Python
142-
from Python_sharp import *
142+
from python_sharp import *
143143

144144
#your code
145145
```
@@ -148,11 +148,11 @@ from Python_sharp import *
148148

149149
Currently there is an upcoming effort to create a VS code extension to deliver a better experience while using Python sharp, an example of this is a custom OUTLINE to visualize *@property* and *@event* with its corresponding icons as the next image shows:
150150

151-
![outline support](https://raw.githubusercontent.com/juanclopgar97/Python_sharp/refs/heads/master/documentation_images/outline_support.png)
151+
![outline support](https://raw.githubusercontent.com/juanclopgar97/python_sharp/refs/heads/master/documentation_images/outline_support.png)
152152

153153
and so much more!, if you want to see it come true you can show interest using and spreading the use of Python sharp, this will help to add more support to the project.
154154

155-
To create an enhancement request, report a bug, raise a question etc. you can use the [issues](https://github.com/juanclopgar97/Python_sharp/issues) section of this repository with the corresponding labels **enhancement**, **bug**, **question** etc. in this way collaborators can check for the request and attend it.
155+
To create an enhancement request, report a bug, raise a question etc. you can use the [issues](https://github.com/juanclopgar97/python_sharp/issues) section of this repository with the corresponding labels **enhancement**, **bug**, **question** etc. in this way collaborators can check for the request and attend it.
156156

157157
## Important disclaimer
158158

@@ -165,7 +165,7 @@ For this reason always **FOLLOW THE CONVENTIONS** since this is necessary to kee
165165

166166
## Use cases and examples:
167167

168-
In this repository there are 2 main files "Python_sharp.py" (which is the module file) and "test.py". This last file contains all the features applied into one single script, this could be really useful if you want to do a quick check about how something is implemented, however, since it is a "testing" script and not a "walk through" it could be confusing if you do not know what is going on, so it is **Highly recommended** read the documentation below which explains step by step how to implement every single feature in the module.
168+
In this repository there are 2 main files "python_sharp.py" (which is the module file) and "test.py". This last file contains all the features applied into one single script, this could be really useful if you want to do a quick check about how something is implemented, however, since it is a "testing" script and not a "walk through" it could be confusing if you do not know what is going on, so it is **Highly recommended** read the documentation below which explains step by step how to implement every single feature in the module.
169169

170170
### Delegates
171171

@@ -175,7 +175,7 @@ Python sharp Delegates are a list of callables with the same signature, when a d
175175
It is really important to keep the callables added into the delegate with consistent signatures because parameters passed to the delegate when is being executed are the same ones passed to every single callable in the collection, so if one callable signature is expecting only 2 parameters and the next callable 3 parameters this is going to cause a TypeError that might look like this:
176176

177177
```Python
178-
from Python_sharp import *
178+
from python_sharp import *
179179

180180
def function_1(parameter_1:int): # defining a function with 1 parameter (int type)
181181
print("function 1")
@@ -198,7 +198,7 @@ Traceback (most recent call last):
198198
File "c:\PATH\test.py", line 341, in <module>
199199
delegate(5) # executing the delegate with only 1 parameter
200200
^^^^^^^^^^^
201-
File "c:\PATH\Python_sharp.py", line 72, in __call__
201+
File "c:\PATH\python_sharp.py", line 72, in __call__
202202
results.append(callable( *args, **kwds))
203203
^^^^^^^^^^^^^^^^^^^^^^^^
204204
TypeError: function_2() missing 1 required positional argument: 'parameter_2'
@@ -211,7 +211,7 @@ Here *function_1* was executed correctly due the signature of the function match
211211
Once the delegate is executed you can get the returned values (if Any) as a tuple returned by the delegate, this tuple represents the values returned by every callable in the delegate's callable collection:
212212

213213
```Python
214-
from Python_sharp import *
214+
from python_sharp import *
215215

216216
def function(text:str):
217217
print("%s, Function is being executed!" % text)
@@ -352,7 +352,7 @@ Below this text, the use cases and explanation about the events are shown, pleas
352352
##### Simple events
353353

354354
```Python
355-
from Python_sharp import *
355+
from python_sharp import *
356356

357357
class Person:
358358

@@ -526,7 +526,7 @@ person.name = "Something" # change the name again to prove 'person_name_changed'
526526
##### Events with arguments
527527

528528
```Python
529-
from Python_sharp import *
529+
from python_sharp import *
530530
from typing import Callable
531531

532532
class MovedEventArgs(EventArgs):
@@ -721,7 +721,7 @@ Second difference is when *location* settter is calling *\_on\_moved* method, no
721721
##### Events with modifiable arguments
722722

723723
```Python
724-
from Python_sharp import *
724+
from python_sharp import *
725725
from typing import Callable
726726

727727
class LocationChangingEventArgs(CancellableEventArgs):
@@ -794,7 +794,7 @@ On this example an event named "location_changing" is implemented to notify when
794794
Key difference is the way the custom *EventArgs* is defined:
795795

796796
```Python
797-
class CancellableEventArgs(EventArgs): #Defined already on Python_sharp module
797+
class CancellableEventArgs(EventArgs): #Defined already on python_sharp module
798798

799799
_cancel:bool
800800

@@ -875,7 +875,7 @@ Imagine a class that provides the number of instances that it creates, this vari
875875
Now imagine we want to notify when an instance is created, in other words when the *static variable* changes its value, as this event is going to notify something is going on with a static variable, we need a static event:
876876

877877
```Python
878-
from Python_sharp import *
878+
from python_sharp import *
879879

880880
class Person:
881881

@@ -930,4 +930,4 @@ Key differences:
930930
- All members used (variable, methods and event) are static (use of @staticevent instead of @event)
931931
- Get/Set methods to encapsulate the static variable are implemented as static methods due to the lack of static properties implementation in Python
932932

933-
And that is it, those are all differences, so if you have questions about how this code works, it is **HIGHLY RECOMMENDED** go back to [Events](#Events) section or raise a question on the [issues](https://github.com/juanclopgar97/Python_sharp/issues) section of this repository.
933+
And that is it, those are all differences, so if you have questions about how this code works, it is **HIGHLY RECOMMENDED** go back to [Events](#Events) section or raise a question on the [issues](https://github.com/juanclopgar97/python_sharp/issues) section of this repository.

0 commit comments

Comments
 (0)