Skip to content

Commit bd05e9e

Browse files
authored
Fixed wrong output of isinstance(False, float)
Fixed the output of `isinstance(False, float)` and changed `False` to `True` to match `isinstance(True, int)`
1 parent f5565ee commit bd05e9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,8 +1510,8 @@ a, b = a[b] = {}, 5
15101510
```py
15111511
>>> isinstance(True, int)
15121512
True
1513-
>>> isinstance(False, float)
1514-
True
1513+
>>> isinstance(True, float)
1514+
False
15151515
```
15161516
* 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!):
15171517
```py

0 commit comments

Comments
 (0)