New submission from John Taylor: import os.path a = [ r'c:\Windows\notepad.exe' ] print( os.path.getsize(a) )
Under Python 3.2.3, this error message is returned: File "c:\python32\lib\genericpath.py", line 49, in getsize return os.stat(filename).st_size TypeError: Can't convert 'list' object to str implicitly Under Python 3.3.0rc2, this error message is returned: File "c:\Python33\lib\genericpath.py", line 49, in getsize return os.stat(filename).st_size TypeError: an integer is required I feel like the 3.2.3 behavior is more accurate and would like to propose that the 3.3 error message says something about a list instead of an integer. ---------- components: Extension Modules messages: 170726 nosy: jftuga priority: normal severity: normal status: open title: wrong error message for os.path.getsize type: behavior versions: Python 3.3 _______________________________________ 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