Talk:Sparkline in unicode: Difference between revisions

no edit summary
(Reply to question.)
No edit summary
Line 34:
::Sorry, I didn't mean the try/except on raw_input, but the one on bar (try: bar = u'▁▂▃▄▅▆▇█' except: bar = '▁▂▃▄▅▆▇█'). Following that link, I am certainly closer to understanding, but still slightly adrift. Is it something to do with u'xx' being ''invalid syntax''' in 3.0 .. 3.2 but accepted/ignored in 3.3+? --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 17:33, 11 January 2019 (UTC)
 
:::Yes,Petelomax: exactly.It's true that Originallyoriginally Python 3.x didn't accept the <code>u'...'</code> syntax because normal <code>'...'</code> strings are already Unicode. More recent versions accept the syntax, but the <code>u</code> has no effect. So that might explain the try: there, except that a try/except doesn't do any good for syntax errors. So I'm as puzzled as you are.--[[User:Markjreed|Markjreed]] ([[User talk:Markjreed|talk]]) 19:05, 11 January 2019 (UTC)
1,480

edits