Bug: The code examples on the main page don't match their source code
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
apps/codesamples/factories.py から始め、再現手順に記載されているとおり、その例を https://www.python.org にレンダリングされたコードと比較します。ソースコードからウェブサイトへの出力を追跡し、メインページの例がリンク、フォーマット、プロンプト、出力を含めてソースコードと一致していることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
Here's a diff between what the html should look like according to the source code and the website
diff --git a/source.md b/website.md
index fb765d0..6a4ea3c 100644
--- a/source.md
+++ b/website.md
@@ -2,8 +2,8 @@
<p>Experienced programmers in any other language can pick up Python very
quickly, and beginners find the clean syntax and indentation structure
easy to learn.
-<a href="https://docs.python.org/3/tutorial/">Whet your appetite</a>
-with our Python overview.</p>
+<a href="//docs.python.org/3/tutorial/">Whet your appetite</a>
+with our Python 3 overview.</p>
```python
# Simple output (with Unicode)
@@ -23,9 +23,7 @@ Hi, Python.
straightforward: the operators <code>+</code>, <code>-</code>,
<code>*</code> and <code>/</code> work as expected; parentheses
<code>()</code> can be used for grouping.
-<a href="https://docs.python.org/3/tutorial/introduction.html
-#using-python-as-a-calculator">More about simple math functions</a>.
-</p>
+<a href="http://docs.python.org/3/tutorial/introduction.html#using-python-as-a-calculator">More about simple math functions in Python 3</a>.</p>
```python
# Simple arithmetic
@@ -43,11 +41,10 @@ straightforward: the operators <code>+</code>, <code>-</code>,
<p>Lists (known as arrays in other languages) are one of the
compound data types that Python understands. Lists can be indexed,
sliced and manipulated with other built-in functions.
-<a href="https://docs.python.org/3/tutorial/introduction.html
-#lists">More about lists</a></p>
+<a href="//docs.python.org/3/tutorial/introduction.html#lists">More about lists in Python 3</a></p>
```python
-# List comprehensions
+# Python 3: List comprehensions
>>> fruits = ['Banana', 'Apple', 'Lime']
>>> loud_fruits = [fruit.upper() for fruit in fruits]
>>> print(loud_fruits)
@@ -63,16 +60,16 @@ sliced and manipulated with other built-in functions.
languages speak — <code>if</code>, <code>for</code>,
<code>while</code> and <code>range</code> — with some of
its own twists, of course.
-<a href="https://docs.python.org/3/tutorial/controlflow.html">
-More control flow tools</a></p>
+<a href="//docs.python.org/3/tutorial/controlflow.html">
+More control flow tools in Python 3</a></p>
```python
# For loop on a list
>>> numbers = [2, 4, 6, 8]
>>> product = 1
>>> for number in numbers:
-... product = product * number
-...
+... product = product * number
+...
>>> print('The product is:', product)
The product is: 384
```
@@ -81,18 +78,16 @@ The product is: 384
<p>The core of extensible programming is defining functions.
Python allows mandatory and optional arguments, keyword arguments,
and even arbitrary argument lists.
-<a href="https://docs.python.org/3/tutorial/controlflow.html
-#defining-functions">More about defining functions</a></p>
+<a href="//docs.python.org/3/tutorial/controlflow.html#defining-functions">More about defining functions in Python 3</a></p>
```python
-# Write Fibonacci series up to n
+# Python 3: Fibonacci series up to n
>>> def fib(n):
-... a, b = 0, 1
-... while a < n:
-... print(a, end=' ')
-... a, b = b, a+b
-... print()
-...
+>>> a, b = 0, 1
+>>> while a < n:
+>>> print(a, end=' ')
+>>> a, b = b, a+b
+>>> print()
>>> fib(1000)
-0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610
+0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987
To Reproduce
- Go to https://www.python.org
- Compare with https://github.com/python/pythondotorg/blob/main/apps/codesamples/factories.py
Expected behavior
I would expect the website to match the source code.
URL to the issue
No response
Screenshots
Browsers
Safari
Operating System
macOS
Browser Version
18.6
Relevant log output
Additional context
No response
- 主要言語
- Python
- スター
- 1.7k
- フォーク
- 700
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 14
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python/pythondotorg のほかの issue
-
app/pages bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
python/pythondotorg#2677 · コメント 3 件 ·
-
backend easy
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
python/pythondotorg#2453 · コメント 8 件 ·
-
bug good-first-issue
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
python/pythondotorg#3125 · コメント 1 件 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
python/pythondotorg#3094 · コメント 5 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
python/pythondotorg#3041 · コメント 3 件 · リアクション 1 件 ·
python/pythondotorg の issue をすべて見る
似ている issue
-
triage/confirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
NousResearch/hermes-agent#118866 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
apache/cloudstack#14222 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100