mirror of
https://github.com/satwikkansal/wtfpython
synced 2024-11-25 04:24:23 +01:00
Fixed wrong output of isinstance(False, float)
Fixed the output of `isinstance(False, float)` and changed `False` to `True` to match `isinstance(True, int)`
This commit is contained in:
parent
f5565ee615
commit
bd05e9e723
4
README.md
vendored
4
README.md
vendored
@ -1510,8 +1510,8 @@ a, b = a[b] = {}, 5
|
|||||||
```py
|
```py
|
||||||
>>> isinstance(True, int)
|
>>> isinstance(True, int)
|
||||||
True
|
True
|
||||||
>>> isinstance(False, float)
|
>>> isinstance(True, float)
|
||||||
True
|
False
|
||||||
```
|
```
|
||||||
* 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!):
|
* 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!):
|
||||||
```py
|
```py
|
||||||
|
Loading…
Reference in New Issue
Block a user