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 flox
Recipients flox
Date 2012-06-13.12:47:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1339591674.58.0.511161996211.issue15054@psf.upfronthosting.co.za>
In-reply-to
Content
With Python 2.7, both b'hello' and br'hello' are wrong.
With Python 3.3, b'hello' is wrong.



$ python2.7 -m tokenize <<<"'hello', u'hello', ur'hello', b'hello', br'hello'"
1,0-1,7:	STRING	"'hello'"
1,7-1,8:	OP	','
1,9-1,17:	STRING	"u'hello'"
1,17-1,18:	OP	','
1,19-1,28:	STRING	"ur'hello'"
1,28-1,29:	OP	','
1,30-1,31:	NAME	'b'
1,31-1,38:	STRING	"'hello'"
1,38-1,39:	OP	','
1,40-1,42:	NAME	'br'
1,42-1,49:	STRING	"'hello'"
1,49-1,50:	NEWLINE	'\n'
2,0-2,0:	ENDMARKER	''

$ python3.3 -m tokenize <<<"'hello', u'hello', ur'hello', b'hello', br'hello', rb'hello'"
1,0-1,7:            STRING         "'hello'"      
1,7-1,8:            OP             ','            
1,9-1,17:           STRING         "u'hello'"     
1,17-1,18:          OP             ','            
1,19-1,28:          STRING         "ur'hello'"    
1,28-1,29:          OP             ','            
1,30-1,31:          NAME           'b'            
1,31-1,38:          STRING         "'hello'"      
1,38-1,39:          OP             ','            
1,40-1,49:          STRING         "br'hello'"    
1,49-1,50:          OP             ','            
1,51-1,60:          STRING         "rb'hello'"    
1,60-1,61:          NEWLINE        '\n'           
2,0-2,0:            ENDMARKER      ''
History
Date User Action Args
2012-06-13 12:47:54floxsetrecipients: + flox
2012-06-13 12:47:54floxsetmessageid: <1339591674.58.0.511161996211.issue15054@psf.upfronthosting.co.za>
2012-06-13 12:47:53floxlinkissue15054 messages
2012-06-13 12:47:53floxcreate