From fa2028d37c17763e999cf7969b933896b190e8b2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2026 18:00:07 +0200 Subject: [PATCH] chore: sync content to repo (#10164) Co-authored-by: nilbuild <4921183+nilbuild@users.noreply.github.com> --- .../python/content/comments@__ndo1gcuUUtzmBnMIAbR.md | 8 ++++++++ .../python/content/type-annot@syV0DT_3ITgIFDbwPts8i.md | 8 ++++++++ .../variables-and-data-types@dEFLBGpiH6nbSMeR7ecaT.md | 1 + 3 files changed, 17 insertions(+) create mode 100644 src/data/roadmaps/python/content/comments@__ndo1gcuUUtzmBnMIAbR.md create mode 100644 src/data/roadmaps/python/content/type-annot@syV0DT_3ITgIFDbwPts8i.md diff --git a/src/data/roadmaps/python/content/comments@__ndo1gcuUUtzmBnMIAbR.md b/src/data/roadmaps/python/content/comments@__ndo1gcuUUtzmBnMIAbR.md new file mode 100644 index 000000000..d2c8c9a11 --- /dev/null +++ b/src/data/roadmaps/python/content/comments@__ndo1gcuUUtzmBnMIAbR.md @@ -0,0 +1,8 @@ +# Docstrings and Comments + +Docstrings and comments document what code does and why. A docstring is a string literal placed right after a function, class, or module definition, and it becomes accessible through the object's __doc__ attribute, which tools use to generate documentation automatically. Comments, marked with #, explain specific lines or blocks of code and are ignored by the interpreter. Docstrings typically describe the purpose, parameters, and return value of a function, while comments clarify tricky logic or note reasons behind a particular implementation choice. + +Visit the following resources to learn more: + +- [@official@Docstring Conventions](https://peps.python.org/pep-0257/) +- [@article@Python Comments](https://www.w3schools.com/python/python_comments.asp) \ No newline at end of file diff --git a/src/data/roadmaps/python/content/type-annot@syV0DT_3ITgIFDbwPts8i.md b/src/data/roadmaps/python/content/type-annot@syV0DT_3ITgIFDbwPts8i.md new file mode 100644 index 000000000..e595de9b4 --- /dev/null +++ b/src/data/roadmaps/python/content/type-annot@syV0DT_3ITgIFDbwPts8i.md @@ -0,0 +1,8 @@ +# Type Annotations + +Type annotations let developers specify the expected data types of variables, function parameters, and return values in Python. The interpreter does not enforce these hints at runtime, but tools like mypy and pyright use them to catch type errors before execution. A function can declare def add(a: int, b: int) -> int: to signal that it expects integers and returns one. Type annotations make code easier to read and help catch bugs early, especially in larger codebases. + +Visit the following resources to learn more: + +- [@official@Type Annotations](https://typing.python.org/en/latest/spec/annotations.html) +- [@article@Understanding type annotation in Python](https://blog.logrocket.com/understanding-type-annotation-python/) \ No newline at end of file diff --git a/src/data/roadmaps/python/content/variables-and-data-types@dEFLBGpiH6nbSMeR7ecaT.md b/src/data/roadmaps/python/content/variables-and-data-types@dEFLBGpiH6nbSMeR7ecaT.md index 9436de24c..31cef3748 100644 --- a/src/data/roadmaps/python/content/variables-and-data-types@dEFLBGpiH6nbSMeR7ecaT.md +++ b/src/data/roadmaps/python/content/variables-and-data-types@dEFLBGpiH6nbSMeR7ecaT.md @@ -7,4 +7,5 @@ Visit the following resources to learn more: - [@article@Variables in Python](https://realpython.com/python-variables) - [@article@Python for Beginners: Data Types](https://thenewstack.io/python-for-beginners-data-types/) - [@article@Python Null (None): Guide to Missing Values and NoneType](https://roadmap.sh/python/null) +- [@article@Python Max Int: Understanding Arbitrary Precision Integers](https://roadmap.sh/python/max-int) - [@video@Python Variables and Data Types](https://www.youtube.com/playlist?list=PLBlnK6fEyqRhN-sfWgCU1z_Qhakc1AGOn) \ No newline at end of file