Dealing with the __str__ method in classes with lots of attributes

Jean-Michel Pichavant jeanmichel at sequans.com
Fri May 11 11:09:24 EDT 2012


Mark Lawrence wrote:
> On 11/05/2012 15:32, Andreas Tawn wrote:
>
>> It's also helpful to not have to display every attribute, of which 
>> there may be dozens.
>
> Do I detect a code smell here?
>
I think so, Murphy's law dictates that the attribute you're interested 
in will not be displayed anyway.

JM



More information about the Python-list mailing list