Mattia Verga added the comment:
I started trying to reproduce this with different Python interpreters and I've
found it now works as expected also with the original one (BTW it was CPython
3.7.6).
I really don't know why it didn't work before. Sorry for the noise.
--
resolution: ->
Karthikeyan Singaravelan added the comment:
I can't reproduce this on Linux machine with Python 3.7 and 3.8. Assigning the
open file object shouldn't really make a difference unless you are passing the
same file object that was read to initialize a different configparser object.
cat review-s
New submission from Mattia Verga :
I'm trying to assign a file object to a variable and then pass this variable to
configparse.read_file(), but for some reason that doesn't work:
>>> import configparser
>>> config = configparser.ConfigParser()
>>> config.read_file(open('review-stats.cfg'))
>>>