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

Integer infos #12

Merged
merged 3 commits into from Oct 3, 2020
Merged

Integer infos #12

merged 3 commits into from Oct 3, 2020

Conversation

mforsetti
Copy link
Contributor

Please read the contributing guidelines before submitting a pull request.


Describe the change
Adding info on integer bases in Python, and using underscores as digit group separator.

Additional context
Because there's no info on literals (i.e. string literals, integer literals, float literals, etc), I'm adding it in syntax/variable.py. Hope that's okay.

Copy link
Owner

@huangsam huangsam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good! Just wanted to let you know I'll be making some slight changes to the grammar

@@ -28,6 +28,18 @@ def main():
assert isinstance(c, object) and isinstance(c_type, object)
assert isinstance(d, object) and isinstance(d_type, object)

# We can represent integer literals in Python using 4 bases: decimal,
# hexadecimal, octal, and binary.
# Decimal literals does not require any prefix, while other bases require
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decimal literals "do" not require...

# We can represent integer literals in Python using 4 bases: decimal,
# hexadecimal, octal, and binary.
# Decimal literals does not require any prefix, while other bases require
# prefixes: `0x` for hexadecimal, `0o` for octal, `0b` binary.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"0b for binary"

@huangsam huangsam added the enhancement New feature or request label Oct 3, 2020
@sonarcloud
Copy link

sonarcloud bot commented Oct 3, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@mforsetti
Copy link
Contributor Author

Applied changes, sorry about that. English is not my first language.

@huangsam
Copy link
Owner

huangsam commented Oct 3, 2020

No problem 😄 Thanks for the quick changes!

@huangsam huangsam merged commit 6fffc54 into huangsam:master Oct 3, 2020
@huangsam
Copy link
Owner

huangsam commented Oct 3, 2020

Turned out that I needed to make a slight change here: 9980fb9 because I'm using automated linting that enforces a certain format for the codebase. Hope you don't mind. I like the formatting style you did, but it broke the build process 😅

@mforsetti mforsetti deleted the integer-infos branch October 3, 2020 16:08
@huangsam
Copy link
Owner

huangsam commented Oct 3, 2020

@miguelforsetti I understand that your first language isn't English. Are you interested in creating a README.<lang>.md in your native language?

@mforsetti
Copy link
Contributor Author

Turned out that I needed to make a slight change here: 9980fb9 because I'm using automated linting that enforces a certain format for the codebase. Hope you don't mind. I like the formatting style you did, but it broke the build process 😅

Sure, that'll be fine.

@miguelforsetti I understand that your first language isn't English. Are you interested in creating a README.<lang>.md in your native language?

Probably, let's see if I had the chance for that.

huangsam pushed a commit that referenced this pull request Dec 31, 2020
* Add info on integer bases and integer literals.

* Words are hard.

* Bad grammar.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants