Can you use self in __str__

Chris Angelico rosuav at
Fri Nov 28 06:00:43 CET 2014

On Fri, Nov 28, 2014 at 2:04 PM, Shiyao Ma <i at> wrote:
> What if it's in the local namespace of a function or method? IDK, try
> to get that thing first.

What if it's in multiple namespaces? What if it's not in any at all?
Your solution is not going to work in the general case, AND it's a bad
idea. Please don't do this in any code that I'll ever have to


More information about the Python-list mailing list