Nitish <[email protected]> added the comment:
It appears some files like Lib/tokenize.py changes the mode of TextIOWrapper:
text = TextIOWrapper(buffer, encoding, line_buffering=True)
text.mode = 'r'
setting of mode via _PyObject_SetAttrId(wrapper, &PyId_mode, modeobj) is done
in some source files too.
What I don't understand is since TextIOWrapper doesn't store the mode
explicitly, this only adds 'mode' variable to the the object's dict. So why
bother setting the mode in all these files?
----------
nosy: +nitishch
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue32655>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com