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 ocean-city
Recipients loewis, ocean-city
Date 2008年03月17日.13:30:15
SpamBayes Score 0.17883539
Marked as misclassified No
Message-id <1205760617.1.0.758837686266.issue2301@psf.upfronthosting.co.za>
In-reply-to
Content
> I was confusing it with a regular exception, e.g.
> print("年",a)
I'm now invesigating this problem. This comes from another reason.
Please look at fp_setreadl in Parser/tokenizer.c.
This function opens file using codec and doesn't seek to current
position. (fp_setreadl is used when codecs is neigher utf-8 nor 
iso-8859-1 .... tok->decoding_state == STATE_NORMAL)
So
# coding: ascii
# 1
# 2
# 3
raise RuntimeError("a")
# 4
# 5
# 6
outputs 
C:\Documents and Settings\WhiteRabbit>py3k ascii.py
Traceback (most recent call last):
 File "ascii.py", line 6, in <module>
 # 4
RuntimeError: a
[22821 refs]
# One line shifted.
And
# dummy
# coding: ascii
# 1
# 2
# 3
raise RuntimeError("a")
# 4
# 5
# 6
outputs
C:\Documents and Settings\WhiteRabbit>py3k ascii.py
Traceback (most recent call last):
 File "ascii.py", line 8, in <module>
 # 5
RuntimeError: a
[22821 refs]
# Two lines shifted.
History
Date User Action Args
2008年03月17日 13:30:17ocean-citysetspambayes_score: 0.178835 -> 0.17883539
recipients: + ocean-city, loewis
2008年03月17日 13:30:17ocean-citysetspambayes_score: 0.178835 -> 0.178835
messageid: <1205760617.1.0.758837686266.issue2301@psf.upfronthosting.co.za>
2008年03月17日 13:30:16ocean-citylinkissue2301 messages
2008年03月17日 13:30:15ocean-citycreate

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