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/2006-October/069569.html below:

[Python-Dev] __str__ bug?

[Python-Dev] __str__ bug? [Python-Dev] __str__ bug?Mike Krell mbk.lists at gmail.com
Tue Oct 24 22:14:22 CEST 2006
> class S(str):
>     def __str__(self): return "S.__str__"
>
> class U(unicode):
>     def __str__(self): return "U.__str__"
>
> print str(S())
> print str(U())
>
> This script prints:
>
> S.__str__
> U.__str__

Yes, but "print U()" prints nothing, and the explicit str() should not
be necessary.

   Mike
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