Skip to content

Commit 8a1a77e

Browse files
JuanCJuanC
authored andcommitted
Checking and correcting typos
1 parent a3288f8 commit 8a1a77e

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ To install `python_sharp` you can follow either of the options listed:
8686

8787
### Disclaimer
8888

89-
version 1.0.0 is only available through GitHub Pypi does not contain that version.
89+
version 1.0.0 is only available through GitHub PyPI does not contain that version.
9090

9191
### 1. Clone the Repository
9292
If you want to explore the source code, you can clone the repository:
@@ -113,7 +113,7 @@ Example:
113113
pip install git+https://github.com/juanclopgar97/python_sharp.git@v1.0.0
114114
```
115115

116-
### 3. Install from Pypi
116+
### 3. Install from PyPI
117117

118118
```bash
119119
pip install python_sharp
@@ -180,7 +180,7 @@ from python_sharp import *
180180
def function_1(parameter_1:int): # defining a function with 1 parameter (int type)
181181
print("function 1")
182182

183-
def function_2(parameter_1:int,parameter_2:str): # defining a function with 2 parametrs (int,str types)
183+
def function_2(parameter_1:int,parameter_2:str): # defining a function with 2 parameters (int,str types)
184184
print("function 2")
185185

186186
delegate = Delegate() #creating a Delegate
@@ -628,9 +628,9 @@ It is **HIGHLY IMPORTANT** to realize *moved* event signature is *Callable[[obje
628628
- *Callable[[object, MovedEventArgs], None]*
629629
- *Callable[[object, EventArgs], None]*
630630

631-
This 2 signatures are ok due polimorfism, it can be confusing due at first sight seems like we are asigning an *EventArgs* objeect to a *MovedEventArgs* variable (*MovedEventArgs* <- *EventArgs*), this case in OOP (Object Oriented programming) is not valid, due it might throw a Traceback if a *MovedEventArgs* member is trying to be accessed in a *EventArgs* object.
631+
This 2 signatures are ok due polymorphism, it can be confusing due at first sight seems like we are assigning an *EventArgs* objeect to a *MovedEventArgs* variable (*MovedEventArgs* <- *EventArgs*), this case in OOP (Object Oriented programming) is not valid, due it might throw a Traceback if a *MovedEventArgs* member is trying to be accessed in a *EventArgs* object.
632632

633-
However in this example is not the case, the subscriber with *Callable[[object, EventArgs], None]* signature defines how the parameter object is going to be treated by the callable, in this case, the parameter will be used/treated as an *EventArgs*, and the event will provide a *MovedEventArgs* object to the callable so in reallity we are asigning a *MovedEventArgs* object to an *EventArgs* variable (*EventArgs* <- *MovedEventArgs*) which by polimorfism will not cause any issue trying to access any of the *EventArgs* members in a *MovedEventArgs* object.
633+
However in this example is not the case, the subscriber with *Callable[[object, EventArgs], None]* signature defines how the parameter object is going to be treated by the callable, in this case, the parameter will be used/treated as an *EventArgs*, and the event will provide a *MovedEventArgs* object to the callable so in reallity we are assigning a *MovedEventArgs* object to an *EventArgs* variable (*EventArgs* <- *MovedEventArgs*) which by polymorphism will not cause any issue trying to access any of the *EventArgs* members in a *MovedEventArgs* object.
634634

635635
Next code block explains a general case for what was explained above (subscriber signatures accepted by an event).
636636

0 commit comments

Comments
 (0)