Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] typo #74

Closed
wants to merge 5 commits into from
Closed

[FIX] typo #74

wants to merge 5 commits into from

Conversation

yosa-odoo
Copy link

>>> co = Code.from_pycode(add.__code__)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'add' is not defined
>>> co = Code.from_pycode(add2.__code__)
>>> 

```py
>>> co = Code.from_pycode(add.__code__)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'add' is not defined
```
```py
>>> co = Code.from_pycode(add2.__code__)
>>>
```
Issue:
As from PEP 604, Union Type Object has been introduced; the
`__or__` method has been added to support `X | Y` syntax and in some cases
it may override a metaclass `__or__`  implementation

Solution:
Use the `or` operator directly
Positional-Only Parameter has been introduced in
Python3.8 (PEP 570)

Abstract of the PEP:
> This PEP proposes to introduce a new syntax, /, for specifying positional-only parameters in Python function definitions.

> Positional-only parameters have no externally-usable name. When a function accepting positional-only parameters is called, positional arguments are mapped to these parameters based solely on their order.
@yosa-odoo
Copy link
Author

Will make sure everything work as from Python 3.10 before proposing something

@yosa-odoo yosa-odoo closed this Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant