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 Roy.Fox
Recipients Roy.Fox
Date 2011年07月06日.23:27:21
SpamBayes Score 1.1834849e-08
Marked as misclassified No
Message-id <1309994842.51.0.029840708446.issue12510@psf.upfronthosting.co.za>
In-reply-to
Content
Hi,
When you type (not copy-paste!) into an IDLE shell a string literal followed by (
you get a calltip.
When the string contains a bad unicode escaping you get an error (see example below), which makes some sense.
But when the string is raw, it isn't treated as such, and you may get the same error, though now it doesn't make any sense.
Non-raw example:
>>> '\xyz'(
>>> *** Internal Error: rpc.py:SocketIO.localcall()
 Object: exec 
 Method: <bound method Executive.get_the_calltip of <idlelib.run.Executive object at 0x021C2910>> 
 Args: ("'\\xyz'",)
Traceback (most recent call last):
 File "C:\Python32\lib\idlelib\rpc.py", line 188, in localcall
 ret = method(*args, **kwargs)
 File "C:\Python32\lib\idlelib\run.py", line 324, in get_the_calltip
 return self.calltip.fetch_tip(name)
 File "C:\Python32\lib\idlelib\CallTips.py", line 103, in fetch_tip
 entity = self.get_entity(name)
 File "C:\Python32\lib\idlelib\CallTips.py", line 112, in get_entity
 return eval(name, namespace)
 File "<string>", line 1
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-2: truncated \xXX escape
Raw example:
>>> r'\xyz'(
>>> *** Internal Error: rpc.py:SocketIO.localcall()
 Object: exec 
 Method: <bound method Executive.get_the_calltip of <idlelib.run.Executive object at 0x021C2910>> 
 Args: ("'\\xyz'",)
Traceback (most recent call last):
 File "C:\Python32\lib\idlelib\rpc.py", line 188, in localcall
 ret = method(*args, **kwargs)
 File "C:\Python32\lib\idlelib\run.py", line 324, in get_the_calltip
 return self.calltip.fetch_tip(name)
 File "C:\Python32\lib\idlelib\CallTips.py", line 103, in fetch_tip
 entity = self.get_entity(name)
 File "C:\Python32\lib\idlelib\CallTips.py", line 112, in get_entity
 return eval(name, namespace)
 File "<string>", line 1
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-2: truncated \xXX escape
History
Date User Action Args
2011年07月06日 23:27:22Roy.Foxsetrecipients: + Roy.Fox
2011年07月06日 23:27:22Roy.Foxsetmessageid: <1309994842.51.0.029840708446.issue12510@psf.upfronthosting.co.za>
2011年07月06日 23:27:21Roy.Foxlinkissue12510 messages
2011年07月06日 23:27:21Roy.Foxcreate

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