Skip to content

Commit 8135cbb

Browse files
authored
README.md Fix typos
2 parents f8acf49 + bef3f2a commit 8135cbb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2336,7 +2336,7 @@ nan
23362336
23372337
#### 💡 Explanation:
23382338
2339-
`'inf'` and `'nan'` are special strings (case-insensitive), which when explicitly typecasted to `float` type, are used to represent mathematical "infinity" and "not a number" respectively.
2339+
`'inf'` and `'nan'` are special strings (case-insensitive), which when explicitly typecast-ed to `float` type, are used to represent mathematical "infinity" and "not a number" respectively.
23402340
23412341
---
23422342
@@ -2382,15 +2382,15 @@ nan
23822382
>>> 44
23832383
```
23842384
**💡 Explanation:**
2385-
This prank comes from [Raymond Hettinger's tweet](https://twitter.com/raymondh/status/1131103570856632321?lang=en). The space invader operator is actually just a malformatted `a -= (-1)`. Which is eqivalent to `a = a - (- 1)`. Similar for the `a += (+ 1)` case.
2385+
This prank comes from [Raymond Hettinger's tweet](https://twitter.com/raymondh/status/1131103570856632321?lang=en). The space invader operator is actually just a malformatted `a -= (-1)`. Which is equivalent to `a = a - (- 1)`. Similar for the `a += (+ 1)` case.
23862386
23872387
* Python uses 2 bytes for local variable storage in functions. In theory, this means that only 65536 variables can be defined in a function. However, python has a handy solution built in that can be used to store more than 2^16 variable names. The following code demonstrates what happens in the stack when more than 65536 local variables are defined (Warning: This code prints around 2^18 lines of text, so be prepared!):
23882388
```py
23892389
import dis
23902390
exec("""
23912391
def f():
23922392
""" + """
2393-
""".join(["X"+str(x)+"=" + str(x) for x in range(65539)]))
2393+
""".join(["X" + str(x) + "=" + str(x) for x in range(65539)]))
23942394
23952395
f()
23962396

0 commit comments

Comments
 (0)