Skip to content

Commit

Permalink
update with literals info
Browse files Browse the repository at this point in the history
  • Loading branch information
pablovegan committed Jul 6, 2023
1 parent e9cacec commit 15b2688
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,7 @@ Vector pickled in data/vector.pkl!
- [Dataclasses](https://realpython.com/python-data-classes/#basic-data-classes): a concise syntax for classes containing mainly data, similar to structures in C. The library [Pydantic](https://docs.pydantic.dev/latest/) implements automatic type checking when initializing a dataclass.
- [Pre-commits](https://pre-commit.com/): pre-commit hooks allow us to do certain actions before commiting changes with git. For example, we can lint our code with Ruff and fix it with Black whenever we make a commit.
- [Logging](https://realpython.com/python-logging/): keep a record of what is happening in your program.
- [Literals, keywords and builtins](http://python-history.blogspot.com/2013/11/story-of-none-true-false.html)


## Online resources
Expand Down
25 changes: 22 additions & 3 deletions examples/work in progress/10-pytho-internals.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,31 @@
"\"a\" = 3"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"One cannot overrride keywords (reserved words)"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": []
"outputs": [
{
"ename": "SyntaxError",
"evalue": "invalid syntax (4048098288.py, line 1)",
"output_type": "error",
"traceback": [
"\u001b[0;36m Cell \u001b[0;32mIn[1], line 1\u001b[0;36m\u001b[0m\n\u001b[0;31m if = 2\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n"
]
}
],
"source": [
"if = 2"
]
}
],
"metadata": {
Expand Down

0 comments on commit 15b2688

Please sign in to comment.