STINNER Victor added the comment:

It looks like os.stat() and os.path.getsize() converts the list into a byte 
string. It does something like:

>>> x=[]; y=bytes(x); print(y.decode("ascii"))

>>> x=[65, 66, 67]; y=bytes(x); print(y.decode("ascii"))
ABC
>>> x=[None]; y=bytes(x); print(y.decode("ascii"))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'NoneType' object cannot be interpreted as an integer

----------
nosy: +haypo

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15972>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to