Skip to content

Commit 00601f1

Browse files
committed
Remove original examples from documentation for built-in functions to streamline content
1 parent 9d60688 commit 00601f1

File tree

12 files changed

+2
-58
lines changed

12 files changed

+2
-58
lines changed

docs/builtin/bin.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ Here are a few examples of how to use `bin()`:
2828
# Convert integers to binary
2929
print(bin(2)) # Output: 0b10
3030
print(bin(7)) # Output: 0b111
31-
32-
# The original examples
3331
print(bin(1)) # Output: 0b1
3432
print(bin(10)) # Output: 0b1010
3533
print(bin(100)) # Output: 0b1100100

docs/builtin/divmod.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ The `divmod()` function takes two numbers as arguments and returns a tuple conta
2727
quotient, remainder = divmod(10, 3)
2828
print(quotient) # Output: 3
2929
print(remainder) # Output: 1
30-
31-
# Original examples
3230
print(divmod(2, 2)) # Output: (1, 0)
3331
print(divmod(10, 2)) # Output: (5, 0)
3432
print(divmod(7, 2)) # Output: (3, 1)

docs/builtin/id.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ z = 20
3030
print(id(x)) # Output might be something like 4331368528
3131
print(id(y)) # Output will be the same as id(x) because Python caches small integers
3232
print(id(z)) # Output will be different
33-
34-
# Original examples
3533
print(id(1))
3634
print(id('1'))
3735
print(id([1, 2]))

docs/builtin/locals.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,6 @@ my_function("hello", "world")
3434
# {'arg1': 'hello', 'arg2': 'world', 'local_var': 'I am local'}
3535
```
3636

37-
Here is the original example:
38-
39-
```python
40-
def my_function():
41-
name = "Jim"
42-
age = 35
43-
print(locals())
44-
45-
my_function() # {'name': 'Jim', 'age': 35}
46-
```
47-
4837
## See also
4938

5039
- <router-link to="/builtin/globals">globals()</router-link>

docs/builtin/min.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,6 @@ print(min(letters)) # Output: 'a'
4141
print(min(10, 20, 5)) # Output: 5
4242
```
4343

44-
Here is the original example:
45-
46-
```python
47-
>>> min([1, 2, 10, 40, 5])
48-
# 1
49-
>>> min((1, 2, 10, 40, 5))
50-
# 1
51-
```
52-
5344
## See also
5445

5546
- <router-link to="/builtin/max">max()</router-link>

docs/builtin/next.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ print(next(my_iter, "default")) # Output: 1
4848
print(next(my_iter, "default")) # Output: default
4949
```
5050

51-
Here is the original example:
51+
More examples:
5252

5353
```python
5454
>>> i = iter([1, 2, 3])

docs/builtin/oct.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ Here are a few examples of how to use `oct()`:
2929
print(oct(8)) # Output: 0o10
3030
print(oct(10)) # Output: 0o12
3131
print(oct(100)) # Output: 0o144
32-
33-
# The original examples
3432
print(oct(1)) # Output: 0o1
3533
print(oct(1000)) # Output: 0o1750
3634
```

docs/builtin/ord.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ The `ord()` function is the inverse of <router-link to="/builtin/chr">chr()</rou
2626
# Get the Unicode code point of a character
2727
print(ord('A')) # Output: 65
2828
print(ord('')) # Output: 8364
29-
30-
# Original examples
3129
print(ord('1')) # Output: 49
3230
print(ord('a')) # Output: 97
3331
```

docs/builtin/pow.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ print(pow(3, 2)) # Output: 9
3535
# Three arguments
3636
print(pow(3, 2, 4)) # Output: 1 (since 3**2 is 9, and 9 % 4 is 1)
3737

38-
# Original examples
3938
# Basic exponentiation
4039
print(pow(2, 3)) # 8
4140

docs/builtin/reversed.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ for char in reversed("hello"):
4343
# h
4444
```
4545

46-
Here is the original example demonstrating the iterator behavior:
46+
Here is another example demonstrating the iterator behavior:
4747

4848
```python
4949
>>> i = reversed([1, 2, 3])

0 commit comments

Comments
 (0)