homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients ncoghlan, vstinner
Date 2012年03月30日.01:23:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1333070615.18.0.149806895013.issue14439@psf.upfronthosting.co.za>
In-reply-to
Content
Huh? Demonstration please, as the -m switch absolutely does display tracebacks when the call fails:
$ python -m timeit -s "raise RuntimeError"
Traceback (most recent call last):
 File "/usr/lib64/python2.7/timeit.py", line 298, in main
 x = t.timeit(number)
 File "/usr/lib64/python2.7/timeit.py", line 194, in timeit
 timing = self.inner(it, self.timer)
 File "<timeit-src>", line 3, in inner
 raise RuntimeError
RuntimeError
The only tracebacks it suppresses are those for ImportError during the search process, which is deliberate:
$ python -m missing
/usr/bin/python: No module named missing
It even avoids suppressing the traceback when the module is found and an import error occurs later:
$ python -m timeit -s "import missing"
Traceback (most recent call last):
 File "/usr/lib64/python2.7/timeit.py", line 298, in main
 x = t.timeit(number)
 File "/usr/lib64/python2.7/timeit.py", line 194, in timeit
 timing = self.inner(it, self.timer)
 File "<timeit-src>", line 3, in inner
 import missing
ImportError: No module named missing
History
Date User Action Args
2012年03月30日 01:23:35ncoghlansetrecipients: + ncoghlan, vstinner
2012年03月30日 01:23:35ncoghlansetmessageid: <1333070615.18.0.149806895013.issue14439@psf.upfronthosting.co.za>
2012年03月30日 01:23:34ncoghlanlinkissue14439 messages
2012年03月30日 01:23:34ncoghlancreate

AltStyle によって変換されたページ (->オリジナル) /