Message203008
In an interactive session, typing 'import this' a second time doesn't produce output (as the module's already imported). Peeking into the module shows a string and what looks like a translation dictionary, but doing the obvious thing:
>>> this.s.translate(this.d)
doesn't work, because str.translate() expects a dictionary that maps Unicode ordinals, not one-character strings.
Attached is a patch which makes Lib/this.py use s.translate() instead of the wordier comprehension. Dare I ask, is there any possible code that this change could break? :) |
|
Date |
User |
Action |
Args |
2013-11-16 04:46:43 | Rosuav | set | recipients:
+ Rosuav |
2013-11-16 04:46:43 | Rosuav | set | messageid: <1384577203.93.0.74432815372.issue19621@psf.upfronthosting.co.za> |
2013-11-16 04:46:43 | Rosuav | link | issue19621 messages |
2013-11-16 04:46:43 | Rosuav | create | |
|