New submission from Geraldo Xexeo :
# When you run the program:
a,b=300,300
print(a is b)
#you get different results in 3.6 (True) and 3.7 (False)
--
components: Interpreter Core
files: testisbehavior.py
messages: 339900
nosy: Geraldo.Xexeo
priority: normal
severity: normal
status
Geraldo Xexeo added the comment:
"So 2**8 is a magic number, for whatever reason."
Actually, this is true. Accordingly to
https://rushter.com/blog/python-integer-implementation/
"Optimization of commonly-used integers
Small integer objects in a range of -5 to 256 are alway
Geraldo Xexeo added the comment:
The same program will behave different in Windows and Mac.
utf-8 works on Mac (10.6.8), cp1256 does not print some lines
cp1256 works on Windows 7, utf-8 prints some characters in a wrong way
For the record, I use accentuated letters from Portuguese alphabet
New submission from Geraldo Xexeo :
The fact that in IDLE sys.stdin is a idlelib.rpc.RPCProxy results in programs
having different behavior in IDLE and in Command Line mode.
I noticed that when grading many students exercises in IDLE. Things like:
sys.stdin.readlines()
just don“t exists in