A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/1999-December/001730.html below:

[Python-Dev] str(1L) -> '1' ?

[Python-Dev] str(1L) -> '1' ? [Python-Dev] str(1L) -> '1' ?Guido van Rossum guido@CNRI.Reston.VA.US
Thu, 23 Dec 1999 09:46:58 -0500
[Jim F]
> In November there was an interesting discussion on comp.lang.python 
> about the meaning of __str__ and __repr__.  One tidbit that came out
> of this discussion was that __str__ for longs should drop the trailing 
> 'L'. Was there a decision on this? I'd really like this to happen.

Yes, I'd like it to happen.  I'd also like repr() of a float to return
the full precision (using the "%.17g" sprintf format).

I haven't done it for lack of time -- feel free to send a patch (don't
forget the disclaimer from http://www.python.org/1.5/bugrelease.html).

We haven't decided yet what to do with the greater topic of that
discussion (or was it a different one?) -- whether the values printed
by typing a bare expression in interactive mode should use str(),
repr(), or str-special-casing-the-snot-out-of-strings().

--Guido van Rossum (home page: http://www.python.org/~guido/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4