joe-greenawalt / skulpt

Automatically exported from code.google.com/p/skulpt
Other
0 stars 0 forks source link

repr(of char) returns "" #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Code you're trying to run:
at repl:
[c for c in "asdf"]
prints:
[, , , ]

What does "real" Python output?
['a', 's', 'd', 'f']

a (related?) example:
for c in "asdf": print c # works as expected
for c in "asdf": print repr(c) # prints 4 blank lines 

What browser are you using? On what operating system?
safari 4.0.3 on os x 10.5.8

Please provide any additional information.

Original issue reported on code.google.com by nwinters...@gmail.com on 16 Aug 2009 at 8:05

GoogleCodeExporter commented 9 years ago
perhaps it returns an object not "", which would explain this error:
"'"+repr("asdf"[0])+"'"
results in: TypeEror: cannot concatenate 'string' and 'object' objects

Original comment by nwinters...@gmail.com on 16 Aug 2009 at 8:14

GoogleCodeExporter commented 9 years ago

Original comment by sgraham on 25 Aug 2009 at 10:48

GoogleCodeExporter commented 9 years ago
str iter was returning wrong type

Original comment by sgraham on 28 Aug 2009 at 4:13