Message 191541 - Python tracker

Message191541

Author techtonik
Recipients brett.cannon, docs@python, techtonik
Date 2013-06-20.22:02:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1371765779.3.0.276411925742.issue18269@psf.upfronthosting.co.za>
In-reply-to
Content
Right. This report is about improving error message. It doesn't say what is expected where. If you have a call like:

    os.fchmod(outfile, unixperm)

it is easy to assume that unixperm is not integer, while in fact the problem is in outfile. This could not be actual for Python 3, but it seems that there is bug with it as well.

>>> v = open("VERSION")
>>> import os
>>> os.fchmod(v, 0664)
  File "<stdin>", line 1
    os.fchmod(v, 0664)
                    ^
SyntaxError: invalid token
>>>
History
Date User Action Args
2013-06-20 22:02:59techtoniksetrecipients: + techtonik, brett.cannon, docs@python
2013-06-20 22:02:59techtoniksetmessageid: <1371765779.3.0.276411925742.issue18269@psf.upfronthosting.co.za>
2013-06-20 22:02:59techtoniklinkissue18269 messages
2013-06-20 22:02:59techtonikcreate