Actually,
>> print(list(foo, bar))
Traceback (most recent call last):
File "", line 1, in
TypeError: list()
On 11/17/2016 04:09 PM, MRAB wrote:
On 2016-11-17 23:49, Boylan, Ross wrote:
Thank you; I can confirm that overriding __repr__ makes the list display as I
wanted.
The decision to use repr inside the list seems very odd, given the context,
namely formatting something for display or looking
On Thursday, November 17, 2016 at 6:50:07 PM UTC-5, Boylan, Ross wrote:
> Thank you; I can confirm that overriding __repr__ makes the list display as I
> wanted.
>
> The decision to use repr inside the list seems very odd, given the context,
> namely formatting something for display or looking
On 2016-11-17 23:49, Boylan, Ross wrote:
Thank you; I can confirm that overriding __repr__ makes the list display as I
wanted.
The decision to use repr inside the list seems very odd, given the context,
namely formatting something for display or looking for a simple string
representation.
Thank you; I can confirm that overriding __repr__ makes the list display as I
wanted.
The decision to use repr inside the list seems very odd, given the context,
namely formatting something for display or looking for a simple string
representation. It seems more natural to me to use str or,
On Fri, Nov 18, 2016 at 10:04 AM, Boylan, Ross wrote:
> Even after defining custom __str__ and __format__ methods they don't affect
> the display of objects when they are in a list. Is there a way to change
> that, other than explicitly converting each list element to a
Even after defining custom __str__ and __format__ methods they don't affect the
display of objects when they are in a list. Is there a way to change that,
other than explicitly converting each list element to a string?
The last line of output below shows that when I format the list I get