[Python-ideas] Changing str(someclass) to return only the class name
Ethan Furman
ethan at stoneleaf.us
Sat Oct 29 00:20:23 CEST 2011
Ka-Ping Yee wrote:
> I'd just like some kind of visual hint as to what it is. Like:
>
> >>> print x
> foo()
>
> or:
>
> >>> print x
> function foo
>
> or:
>
> >>> print x
> function foo(a, b)
>
> or:
>
> >>> print x
> class Bar
>
> In fact "function foo(a, b)" would actually be rather useful
> in a lot of situations, and I would argue, friendlier than "foo".
+1 If we're gonna make a change, let's make it a great one. :)
~Ethan~
More information about the Python-ideas
mailing list