This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gavin
Recipients fdrake, gavin
Date 2019-04-23.12:47:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1556023669.77.0.896724829798.issue36705@roundup.psfhosted.org>
In-reply-to
Content
For a simple string input, pprint would be expected to return an output similar to print. However, the functionality differs

### Code:
import time
from pprint import pprint

start = time.time()
time.sleep(0.5)
object_made = time.time()
time.sleep(0.5)
done = time.time()
time.sleep(0.5)
shown = time.time()

pprint(
    f"Time to create object: {object_made - start}s\n" +
    f"Time to insert 100000 rows: {done - object_made}s\n" +
    f"Time to retrieve 100000 rows: {shown - done}s\n"
)

### Output Received:
('Time to create object: 0.5010814666748047s\n'
 'Time to insert 100000 rows: 0.5010972023010254s\n'
 'Time to retrieve 100000 rows: 0.501101016998291s\n')

### Expected Output:
Time to create object: 0.5010814666748047s
Time to insert 100000 rows: 0.5010972023010254s
Time to retrieve 100000 rows: 0.501101016998291s
History
Date User Action Args
2019-04-23 12:47:49gavinsetrecipients: + gavin, fdrake
2019-04-23 12:47:49gavinsetmessageid: <1556023669.77.0.896724829798.issue36705@roundup.psfhosted.org>
2019-04-23 12:47:49gavinlinkissue36705 messages
2019-04-23 12:47:49gavincreate