On Sun, Feb 16, 2014 at 7:40 PM, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote: > There are three simple ways to get the effect that you want: > > py> x = 1; x.__str__() # don't use a literal > '1' > py> (1).__str__() # parenthesize the literal > '1' > py> 1 .__str__() # offset it from the dot with a space > '1'
Four: >>> 0o1.__str__() # use a literal notation that doesn't allow floats '1' ChrisA -- https://mail.python.org/mailman/listinfo/python-list