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/2013-May/126415.html below:

[Python-Dev] What if we didn't have repr?

[Python-Dev] What if we didn't have repr? [Python-Dev] What if we didn't have repr?Mark Janssen dreamingforward at gmail.com
Mon May 20 20:14:49 CEST 2013
> I have pondered it many times, although usually in the form "Why do we
> need both str and repr?"

Here's an idea:  considering python objects are "stateful".   Make a
general, state-query operator: "?".  Then the distinction is clear.

>>> ?"This is a string"  #Returns the contents of the string
This is a string

Then repr() is clearly the object "as it is" -- unstripped; i.e., not
just it's state (or contents, or whatever).
-- 
MarkJ
Tacoma, Washington
More information about the Python-Dev mailing list

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